Writing pseudocode for an assignment that asks to convert the number of pennies collected into dollars and cents, BUT displaying on seperate lines. I understand (sort of) that the \ sign will divide and return an integer result of the whole number and discard the fraction, while the Mod % will divide and return only the remainder as an integer and dicard the whole part of the number. However I am stumped as to how to write this exactly and have it display separetly. I understand how to do all the declarations and input, I just really need help on this part. Thanks!
Brandy_1
0
Newbie Poster
Recommended Answers
Jump to PostThis doesn't have anything to do with pseudocode, and doesn't really belong in computer science. It sounds like a problem in a particular language. See, psudocode is basically writting code in english, and there is no defined standard. You seemed to have some very language spesific terms floating around there.
…
Jump to PostYour arithemetic is correct.
Set Dollars to Pennies\100
is fine.
Set Dollars to Pennies%100
Your overwritting your Dollars! Store Pennies%100 somewhere else!You display then seperately by saying their on different lines! I don't know how much easier it gets then that. If your still confused then here:
Print Dollars …
Jump to PostThen you entered it wrong into "raptor".
All 10 Replies
Hiroshe
499
Posting Whiz in Training
Brandy_1
0
Newbie Poster
Hiroshe
499
Posting Whiz in Training
Brandy_1
0
Newbie Poster
Hiroshe
499
Posting Whiz in Training
Brandy_1
0
Newbie Poster
Hiroshe
499
Posting Whiz in Training
Brandy_1
0
Newbie Poster
Hiroshe
499
Posting Whiz in Training
Brandy_1
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.