4.weight conversion:
Write a program that will read weight in pounds and convert
it into grams.print both the original weight and the
converted value.There are 454 grams in a pound.design and
carry out a test plan for this program.
Answer Posted / vignesh1988i
i#includ<tdio.h>
#include<conio.h>
void main()
{
float pounds , grams;
clrscr();
printf("enter ur weight in pounds :");
scanf("%f",£s);
printf("%f pounds is equivalent to %f
grams ",pounds,pounds*454);
getch();
}
thank u
| Is This Answer Correct ? | 9 Yes | 6 No |
Post New Answer View All Answers
Is main is user defined function?
Describe the difference between = and == symbols in c programming?
What is wrong in this statement? scanf(ā%dā,whatnumber);
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
How many levels of pointers have?
provide an example of the Group by clause, when would you use this clause
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
Why doesn't C support function overloading?
What are the standard predefined macros?
What are predefined functions in c?
Can you explain the four storage classes in C?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
How many keywords (reserve words) are in c?
What is clrscr ()?
What is main () in c?