sahajjain01

Add 3 numbers.

Aug 4th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. //Program to add 3 numbers.
  2. #include<iostream.h>
  3. #include<conio.h>
  4. void main()
  5. {
  6.     clrscr();
  7.     int a,b,c;
  8.     cout<<"Enter first number: ";
  9.     cin>>a;
  10.     cout<<"Enter second number: ";
  11.     cin>>b;
  12.     cout<<"Enter third number: ";
  13.     cin>>c;
  14.     a=a+b+c;
  15.     cout<<"The sum of the numbers is: "<<a;
  16.     getch();
  17. }
Advertisement
Add Comment
Please, Sign In to add comment