sahajjain01

01.Input two numbers and print their sum.

Aug 16th, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. //Program to input two numbers and print their sum.
  2. #include<stdio.h>
  3. #include<conio.h>
  4.  
  5. void main()
  6. {
  7.     float number_1, number_2;
  8.  
  9.     clrscr();
  10.  
  11.     printf("Enter two numbers: ");
  12.     scanf("%f%f", &number_1, &number_2);
  13.     printf("The sum of the numbers %f and %f is: %f", number_1, number_2, number_1 + number_2);
  14.  
  15.     getch();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment