Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Program chapter 2_23*/
- /*This program converts pounds to kilograms.*/
- #include <stdio.h>
- #include <math.h>
- int main(void)
- {
- /*Declare variables.*/
- float lb, kg;
- lb = 0;
- kg = 0;
- printf("This program converts Pounds (Lb) to Kg .\n");
- printf("Please enter the weight in pounds: ");
- scanf_s("%f",lb);
- kg = lb / 2.205;
- printf("The weight in kilograms is %f", kg);
- /*Pause for user input and exit program.*/
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement