Page 6 of 6 FirstFirst ... 3456
Results 61 to 64 of 64

Thread: <= Assignment =>

  1. #61
    appteach is offline Junior Member
    Last Online
    18th February 2016 @ 05:33 PM
    Join Date
    01 Feb 2016
    Age
    28
    Gender
    Male
    Posts
    13
    Threads
    4
    Credits
    0
    Thanked
    2

    Default

    /*Write a program in C++ to get two numbers from keyboard during
    program execution.
    Calculate the Sum(a+b) and Product(a*b)
    of the numbers and then print the result
    on the computer sceen*/
    #include <iostream>
    using namespace std;
    int main()
    {
    int num1,num2,sum,product;
    cout<<"Enter your First number = ";
    cin>>num1;
    cout<<"Enter your second number = ";
    cin>>num2;
    sum=num1+num2;
    cout<<"Sum of these two number is = "<<sum<<endl;
    product=num1*num2;
    cout<<"PRoduct of these two numbers is = "<<product;
    return 0;
    }

  2. #62
    appteach is offline Junior Member
    Last Online
    18th February 2016 @ 05:33 PM
    Join Date
    01 Feb 2016
    Age
    28
    Gender
    Male
    Posts
    13
    Threads
    4
    Credits
    0
    Thanked
    2

    Default


    according to asgmnt sir
    ==================
    using namespace std;
    int main()
    {
    int sum,pro,x,y;
    cout<<"Please enter your first number = ";
    cin>>x;
    cout<<"Please enter your second number = ";
    cin>>y;
    sum=x+y;
    cout<<"Sum os these two number is = "<<sum<<endl;
    pro=x*y;
    cout<<"Product of these two number is = "<<pro;
    return 0;
    }

  3. #63
    Z.Programmer is offline Member
    Last Online
    11th October 2016 @ 10:38 AM
    Join Date
    06 Feb 2016
    Gender
    Male
    Posts
    158
    Threads
    13
    Thanked
    5

    Default

    Quote Abdul Moeed said: View Post
    اسلام علیکم
    کیسے ہیں سب۔ تو جناب آج پہلی اساءمنٹ ہے۔ بہت ہی آسان ہے۔ آپ نے اسے حل کر کے مجھے پراءیوٹ میسج کرنا ہے۔
    آج 26 ہے تو آپ کے میسج 28 تک مل جانے چاہیے۔اس کے بعد میں حل کوڈ بتاوں گا۔ آپ کسی بھی قسم کا سوال کر سکتے ہو۔امید ہے کے آپ سب تعاون کرو گے۔


    Assaignment # 1

    Write a program in C++ to get two numbers from keyboard during program execution. Calculate the Sum(a+b) and Product(a*b) of the numbers and then print the result on the computer sceen
    Ya method kch better hy:-

    Code:
    #include <iostream>
    using namespace std;
    int main()
    {
       
        int num_1, num_2, sum, product;
        char again;
    
       do
         {
             cout<<"Enter first number:- ";
             cin>>num_1;
             cout<<"Enter second number:- ";
             cin>>num_2;
    
             sum = num_1 + num_2;
             product = num_1 * num_2;
    
             cout << "Sum is:- " << sum << endl;
             cout << "Product is :- " << product << endl;
    
             cout << "Do you want to ise thisprogram again?\n";
             cout << "Type Y for yes and N for no\n";
             cin >> again;
    
          } while ( (again == 'y') || (again == 'Y') );
    
       cout << "End of program\n";
    
       return 0;
    }

  4. #64
    Z.Programmer is offline Member
    Last Online
    11th October 2016 @ 10:38 AM
    Join Date
    06 Feb 2016
    Gender
    Male
    Posts
    158
    Threads
    13
    Credits
    132
    Thanked
    5

    Default

    Quote Abdul Moeed said: View Post
    اسلام علیکم
    کیسے ہیں سب۔ تو جناب آج پہلی اساءمنٹ ہے۔ بہت ہی آسان ہے۔ آپ نے اسے حل کر کے مجھے پراءیوٹ میسج کرنا ہے۔
    آج 26 ہے تو آپ کے میسج 28 تک مل جانے چاہیے۔اس کے بعد میں حل کوڈ بتاوں گا۔ آپ کسی بھی قسم کا سوال کر سکتے ہو۔امید ہے کے آپ سب تعاون کرو گے۔


    Assaignment # 1

    Write a program in C++ to get two numbers from keyboard during program execution. Calculate the Sum(a+b) and Product(a*b) of the numbers and then print the result on the computer sceen
    Upload more C++ assignments.

Page 6 of 6 FirstFirst ... 3456

Similar Threads

  1. c++ Assignment Help
    By Nuoman in forum C++
    Replies: 0
    Last Post: 28th October 2015, 09:36 AM
  2. need help for assignment
    By safiullahjan in forum Ask an Expert
    Replies: 6
    Last Post: 22nd February 2014, 12:45 AM
  3. C++ Assignment Help..
    By Murtaza145 in forum Ask an Expert
    Replies: 0
    Last Post: 7th November 2013, 03:23 PM
  4. assignment
    By wasi6 in forum Educational Help
    Replies: 1
    Last Post: 23rd June 2013, 05:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •