May someone help me..
A kilogram is 1000 grams. Write a program that will read the weight of a package oof butter and output the weight in kilograms, as well as the number of package of butter needed to yield 1 kilogram of butter. Your program should allow the user to repeat ththis calculation as often as the user wish..

2 Years
Discussion Span
Last Post by Slavi

Seems like an assignment, what have you done so far? Here's some tips

While loop will keep the program running until user terminates it
cin operator takes an input from the user, such as 500, I assume your input is in grams? multiple it with 1000 and the result will be in kilograms.
cout operator can be used to print back to the user how much was the entered value in kilograms.
At this point you can ask the user whether he wants to continue or exit, using if/else statement will do it such as if user inputs 'q' , terminate the program else, start the loop over

If you face any issues post back with your current code and what exactly you need help with, as no one in here is willing to do it(your homework) for you

Votes + Comments
it's not an assignment. i do have quiz tommorrow about do-while statment, but my instructor didn't teach us. so that i'm asking..
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.