Advertisement

Search Here

Tuesday, 8 April 2014

To add Numbers in C++

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();

cout<<"Enter 1st Number:"<<endl;
float a,b,c;
cin>>a;
cout<<"Enter 2nd Number:"<<endl;
cin>>b;
cout<<"Enter 3rd Number:"<<endl;
cin>>c;
cout<<"Result"<<endl;
cout<<a+b+c;

getch();
}

No comments:

Post a Comment