Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int add();
- int main(){
- printf("Welcome.\n");
- int age = 23;
- float money = 2.50;
- char name[] = "User";
- printf("Hello %s,\n", name);
- printf("You are %d years old.\n", age);
- printf("You have $%.2f.\n\n", money);
- add();
- return 0;
- }
- int add(){
- float A;
- float B;
- float C;
- printf("Enter a number: ");
- scanf("%f", &A);
- printf("Enter another number: ");
- scanf("%f", &B);
- C = A + B;
- printf("Total: %f\n", C);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement