Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Untitled
SUBMITTED BY:
kaiser722
DATE:
Oct. 7, 2016, 4:26 p.m.
FORMAT:
Text only
SIZE:
494 Bytes
Raw
Download
Tweet
HITS:
8098
Go to comments
Report
C++ Language
It converts the weight to ounce.
#include<stdio.h>
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);
}
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus