C++ PROGRAM TO ILLUSTRATE THE USE OF CIN AND COUT WITH OUTPUT – Tutorial 1

0
126

​Heyaa guysss capstricks.net back and this time back to back c++ tutorials to get started with c++ programs so install turbo c++ and start coding with us

Code-

#include<iostream.h>

void main()

{

      int a,b,c;

    char fname[50],lname[50];

     cout<<“enter two numbers \n”;

      cin>>a>>b;

       c=a+b;

        cout<<“the sum of two no. is    “<<c<<endl;

         cout<<“enter your first name \n”;

          cin>>fname;

           cout<<“enter your last name \n’;

            cin>>lname;

            cout<<“hi”<<fname<<”   “<<lname;

also read:-  Download Paid games/apps for free.

}


OUTPUT-

enter two numbers

1

2

the sum of two no. is 3

enter your first name

lakhwinder

enter your last name

singh

hi lakhwinder singh

so this is the first code which you can try if you liked you can go to tutorial 2

Originally posted 2017-01-17 08:33:47. Republished by Blog Post Promoter