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 |
How to write a C program to determine the smallest among three nos using conditional operator?
1) int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); return 0; } can anyone please explain the explain the output
25. It takes five minutes to pass a rumour from one person to two other persons. The tree of rumour continues. Find how many minutes does it take spread the rumour to 768 persons. ?
11 Answers CTS, TCS,
what is the difference between strcpy() and memcpy() function?
#include main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }
What is 1f in c?
How can a program be made to print the name of a source file where an error occurs?
int i=0,j; j=++i + ++i ++i; printf(" %d",j);
Find the middle node in the linked list?? (Note:Do not use for loop, count and count/2)
What is a #include preprocessor?
can we execute the program with the object file
What is a 'null pointer assignment' error?