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 / 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 |
Is c pass by value or reference?
what type of language is C?
#include<stdio.h> int main() { int i=2; int j=++i + ++i + i++; printf("%d\n",i); printf("%d\n",j); }
What is the difference between text and binary i/o?
Explain how do you determine whether to use a stream function or a low-level function?
What is atoi and atof in c?
What are data structures in c and how to use them?
Explain modulus operator.
Why c is a procedural language?
What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value
swap 2 numbers without using third variable?
If fflush wont work, what can I use to flush input?