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
Are the expressions * ptr ++ and ++ * ptr same?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
What are different storage class specifiers in c?
What is a example of a variable?
What is the use of static variable in c?
What is the use of getch ()?
What is typedef example?
What is malloc and calloc?
What is scanf_s in c?
What is the purpose of sprintf() function?
What is function in c with example?
Explain how do you view the path?
How can I invoke another program or command and trap its output?
Is c is a high level language?
What are the different types of control structures in programming?