main( )
{
int pounds;
/* Read first weight in pounds */
printf("\n\n\tWeight in pounds?");
scant("%d",£s);
/* Loop until user signals halt with negatie integer. */
while(pounds>=0)
{
printf("\n\n\tEquivalent weight in ounces: %d", pounds * 16);
printf("\n\n\tWeight in pounds?");
printf("\n\n\tEnter a negative integer to quit.");
scanf("%d",£s);
}
}
No comments:
Post a Comment