Wednesday, December 5, 2018

Data Type and variables||sum of two number||Lecture2

#include <iostream>
using namespace std;
main(){
    int num1,num2, sum;
    cout<<"PLeasr enter the 1st number"<<endl;
    cin>> num1;
    cout<<"PLeasr enter the 2nd NUMber"<<endl;
    cin>>num2;
 
    sum=num1+num2;
    cout<<"Sum of two numbers="<<sum<<endl;
    system("pause");
 
       }

Output:

PLeasr enter the 1st number
2
PLeasr enter the 2nd NUMber
3
Sum of two numbers=5

Press any key to continue . . .



No comments:

Post a Comment

ایک حکیم اور اسکی بیوی کا اللہ پر بھروسہ

پنجاب کے شہر گوجرانوالہ میں ایک حکیم صاحب ہوا کرتے تھے، جن کا مطب ایک پرانی سی عمارت میں ہوتا تھا۔ حکیم صاحب روزانہ صبح مطب جانے سے قبل بیو...