All rights are reserved by Niteesh Kumar.. Theme images by Storman. Powered by Blogger.

Followers

Total Pageviews

Blog Archive

Follow by Email

Translate

Monday, 10 November 2014

C++ program to add two numbers.

you can also use this program to add numbers having decimal point.

c++ code is given below-


#include<iostream.h>

#include<conio.h>

void main()
{
  clrscr();
      float a,b,c;

       cout<<"\n enter a=";

       cin>>a;

       cout<<"\n enter b=";

       cin>>b;

       c=a+b;

       cout<<"\n addition="<<c;

       getch();
    
 }

OUTPUT

 enter a=5

 enter b=7

 addition=12


similar posts-






0 on: "C++ program to add two numbers."