34 : C Program to Convert Pounds to Grams

Check out the complete list of c-programs : C Program List    

C program that converts entered weight in Pounds to Grams.

Variables :

1. pounds : (Datatype float) : to hold weight in Pounds entered by the user.

2. grams : (Datatype float) : to hold grams value computed.

Functions :

printf() : is used to display something on the console/screen. Format specifier %fl in printf function is used to display a float variable on screen. \n is used to add a newline

scanf() : is used to fetch data inputted by the user on the console/screen using keyboard. %f in scanf is indicates that inputted text is of type float.

Formula :

Gram = Pound x 453.592

 * 1000+ C programs + tutorials
 * 31_pound_to_grams_c_program.c
 *  Created on: Oct 20, 2014
 *  Author: Code2care.org


void main() {

 float pound,gram;

//    clrscr();

    printf("C Program to convert Pound to Gram :  ");

    printf("\n\n Enter Weight in Pounds  : ");
	scanf("%f", £);
    gram = pound*453.592;
    printf("\n\n %f Pound  =  %f Gram \n",pound,gram );

//	getch();


The best way to learn C programming is to practice more and more of programs . Code2care C Programming tutorials provide 1000+ programs in C that you can study and become an expert in the language. Programs are divided into categories depending upon type and complexity.

BSc. IT, BSc. Computer Science, BSc. IT, MSc. IT, MSc. Computer Science, MCA, BTech IT & BTech Engineers may find these programs very useful.