Results 1 to 9 of 9

Thread: Perform basic calculation in C++(+,-,/,*)

  1. #1
    Zahid Ali47's Avatar
    Zahid Ali47 is offline Senior Member+
    Last Online
    20th August 2011 @ 10:59 PM
    Join Date
    15 Feb 2009
    Location
    Khanewal
    Age
    32
    Posts
    787
    Threads
    28
    Credits
    0
    Thanked
    2

    Wink Perform basic calculation in C++(+,-,/,*)


    Here is a simple way to Perform basic calculation in C++.
    The calculations will be performed between two values Provided by the user.
    Code:
    # include <iostream.h>
    # include <conio.h>
    void main()
    {
    clrscr(); //Used to clear screen
    float a,b,c,d,e; //Use float as the results can be in Decomals.
    cout<<"Enter the first value"<<endl; //You can change this statement
    cin>>a;
    cout<<"Enter the second value"<<endl;
    cin>>b;
    clrscr();
    cout<<"Addition of two values:"<<a+b<<endl; //First value + second value
    cout<<"Difference of Two values:"<<a-b<<endl; //First value - second value
    cout<<"Product of two values:"<<a*b<<endl; //First value *  second value
    cout<<"Division of two values:"<<a/b<<endl; //First value / second value . You can also perform more calculation by changing the Arithmatic operators.
    getch();
    }
    That's all. Hope this helped you.

  2. #2
    MailKing is offline Senior Member+
    Last Online
    19th December 2013 @ 04:05 PM
    Join Date
    17 Aug 2009
    Posts
    400
    Threads
    20
    Credits
    1,030
    Thanked
    19

    Default

    Good...

  3. #3
    I A Qureshi's Avatar
    I A Qureshi is offline Senior Member+
    Last Online
    27th January 2011 @ 03:36 PM
    Join Date
    07 Jan 2010
    Location
    Rawalpindi
    Posts
    44
    Threads
    4
    Credits
    960
    Thanked
    0

    Default

    Vary Good....

  4. #4
    Ganxtr's Avatar
    Ganxtr is offline Advance Member
    Last Online
    5th July 2019 @ 09:15 AM
    Join Date
    15 Nov 2009
    Location
    CRIME CITY
    Posts
    1,740
    Threads
    18
    Credits
    83
    Thanked
    100

    Default

    Great
    your thread is very nice, thanks 4 sharing with us!

  5. #5
    *Tamraiz*'s Avatar
    *Tamraiz* is offline Advance Member+
    Last Online
    29th August 2022 @ 08:08 AM
    Join Date
    26 Nov 2010
    Location
    Sialkot
    Gender
    Male
    Posts
    16,583
    Threads
    1051
    Credits
    1,207
    Thanked
    1738

    Default

    Nice Sharing

  6. #6
    Shining Star's Avatar
    Shining Star is offline Senior Member+
    Last Online
    25th November 2011 @ 10:38 PM
    Join Date
    02 Dec 2010
    Gender
    Male
    Posts
    201
    Threads
    2
    Credits
    0
    Thanked
    2

    Default

    so nice

  7. #7
    Omer27's Avatar
    Omer27 is offline Advance Member
    Last Online
    30th January 2024 @ 04:01 PM
    Join Date
    27 Jan 2009
    Age
    31
    Posts
    1,725
    Threads
    72
    Credits
    1,374
    Thanked
    66

    Default


  8. #8
    Sidra193 is offline Senior Member+
    Last Online
    4th December 2014 @ 12:46 AM
    Join Date
    05 Nov 2009
    Posts
    122
    Threads
    10
    Credits
    0
    Thanked
    7

    Default

    nice

  9. #9
    ithoun is offline Senior Member+
    Last Online
    16th September 2014 @ 05:43 PM
    Join Date
    31 May 2010
    Posts
    176
    Threads
    38
    Credits
    760
    Thanked
    24

    Default

    i know c programing v 3.0 not c++

Similar Threads

  1. Replies: 11
    Last Post: 6th May 2022, 06:16 PM
  2. Web unable to perform this opretion
    By Nadia rai in forum Mobile phones problems and Help Zone
    Replies: 3
    Last Post: 22nd January 2011, 11:58 PM
  3. Perform Salaah (Prayers) According to Sunnah
    By Doctor in forum Software Reviews
    Replies: 12
    Last Post: 9th January 2011, 10:31 PM
  4. If Animals Perform in Olympics
    By zoologist in forum Photo Gallery
    Replies: 7
    Last Post: 29th August 2009, 01:58 AM

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
  •