Page 1 of 2 12 LastLast
Results 1 to 20 of 25

c++ calculator program code

This is a discussion on c++ calculator program code within the C++ forums, part of the Courses category; c++ calculator program code #include <cstdlib> #include <iostream> using namespace std; int main() { double num; double num2; char choice; ...

  1. #1
    www.rangonoor.com pakjihad's Avatar
    Join Date
    Dec 2009
    Location
    karachi
    Posts
    428

    c++ calculator program code

    c++ calculator program code
    #include <cstdlib>
    #include <iostream>

    using namespace std;

    int main()
    {
    double num;
    double num2;
    char choice;
    for (;{
    do {
    cout<<"Welcome to thejoshcalculator. V1.5\n";
    cout<<"Please choose an option by entering the number, press q to quit\n";
    cout<<"1 - Addition\n";
    cout<<"2 - Subtraction\n";
    cout<<"3 - Division\n";
    cout<<"4 - Multiplication\n";
    cout<<"5 - Help\n";
    cout<<"6 - About This Program\n";
    cout<<"7 - Updates to this program\n";
    cin>>choice;
    } while ( choice < '1' || choice > '7' && choice != 'q');
    if (choice == 'q') break;
    switch (choice) {
    case '1':
    cout<<"Please enter a number\n";
    cin>>num;
    cout<<"Another number to be added\n";
    cin>>num2;
    cout<<num + num2;
    cout<<"\n";
    break;
    case '2':
    cout<<"Please enter a number\n";
    cin>>num;
    cout<<"Another number to be subtracted\n";
    cin>>num2;
    cout<<num - num2;
    cout<<"\n";
    break;
    case '3':
    cout<<"Please enter a number\n";
    cin>>num;
    cout<<"Another one to be divided\n";
    cin>>num2;
    cout<<num / num2;
    cout<<"\n";
    break;
    case '4':
    cout<<"Please enter a number\n";
    cin>>num;
    cout<<"Another one to be multiplied\n";
    cin>>num2;
    cout<<num * num2;
    cout<<"\n";
    break;
    case '5':
    cout<<"This is a simple calculator made by me - Josh.\n";
    cout<<"To select an option, type the number next to the option and press enter\n";
    cout<<"E.G. for division, you would type 3 and press enter.\n";
    cout<<"\n";
    break;
    case '6':
    cout<<"thejoshcalculator, made by Joshua Griggs - Copyright 2007. \n";
    cout<<"Feedback would be nice - joshieboy06************* also, what programmes\n";
    cout<<"do people need. Please give me ideas for programs. Bye!!\n";
    cout<<"\n";
    break;
    case '7':
    cout<<"Updates include: -double variable instead of int, so that decimals can be used.\n";
    cout<<" -do while loop so that you can exit the program yourself\n";
    cout<<"\n";
    break;
    default:
    cout<<"That is not an option";

    }

    }
    return 0;

    }

  2. #2
    ITT Student
    Join Date
    Dec 2009
    Location
    bhakkar/pakistan
    Age
    34
    Posts
    16

    Re: c++ calculator program code

    good

  3. #3
    www.rangonoor.com pakjihad's Avatar
    Join Date
    Dec 2009
    Location
    karachi
    Posts
    428

    Re: c++ calculator program code

    Quote Originally Posted by asifkhan211 View Post
    good
    THANKS

  4. #4
    iTT Student
    Join Date
    May 2010
    Location
    pakistan
    Age
    29
    Posts
    2

    Re: c++ calculator program code

    muja complete c++ book urdu main chiaya kahan se mile gi???????????????????????

  5. #5
    Senior Student hunter's Avatar
    Join Date
    Jul 2008
    Location
    .
    Posts
    364

    Re: c++ calculator program code

    @nice rana
    english writers ziyada detail aur correct baat krty han kher try "jhangeer cpp guide"
    ThE DePth oF FRIENDSHIP Does Not DePend on LenGht of AcQuainTance

  6. #6
    www.rangonoor.com pakjihad's Avatar
    Join Date
    Dec 2009
    Location
    karachi
    Posts
    428

    Re: c++ calculator program code

    Quote Originally Posted by nicerana1 View Post
    muja complete c++ book urdu main chiaya kahan se mile gi???????????????????????

    **********

  7. #7
    iTT Student bilal_sohail's Avatar
    Join Date
    May 2010
    Location
    lahore/pakistan
    Age
    30
    Posts
    3

    Re: c++ calculator program code

    kaafi bugs hain is may bhai...koi code run kr k to dekh lay...
    turbo c may yeh code run karo..buhat bugs hon gay..pehli line may he error hai..
    ....lagta hai kahin say copy paste kia hai ap nay...

  8. #8
    Senior Student hunter's Avatar
    Join Date
    Jul 2008
    Location
    .
    Posts
    364

    Re: c++ calculator program code

    Quote Originally Posted by bilal_sohail View Post
    kaafi bugs hain is may bhai...koi code run kr k to dekh lay...
    turbo c may yeh code run karo..buhat bugs hon gay..pehli line may he error hai..
    ....lagta hai kahin say copy paste kia hai ap nay...
    try it on later versions of c, this code is not compatible with standard tc3.0
    ThE DePth oF FRIENDSHIP Does Not DePend on LenGht of AcQuainTance

  9. #9
    Senior Student rehmanmughal786's Avatar
    Join Date
    May 2010
    Location
    pakistan
    Age
    27
    Posts
    237

    Re: c++ calculator program code

    Nice sharing

  10. #10
    www.rangonoor.com pakjihad's Avatar
    Join Date
    Dec 2009
    Location
    karachi
    Posts
    428

    Re: c++ calculator program code

    THANKS FOR ALL
    Gohar shahi kafir murtad
    گوہر شاہی کافر مرتد



    اگر چاند پر کتے کی شکل نظر آجائے تو نعوزباللہ کیا ہم کتے کو امام مہدی مان لے ؟

    [ame]http://www.ittaleem.com/showthread.php?t=95179[/ame][ame="http://www.ittaleem.com/showthread.php?t=95179"][/ame]
    Attached Images Attached Images

  11. #11
    It Graphic Designer abida15's Avatar
    Join Date
    Aug 2010
    Location
    pakistan
    Posts
    15,459

    Thumb up2 Re: c++ calculator program code

    nice sharing




    You can do what you have to do,
    and sometimes you can do it
    even better than you think
    you can

  12. #12
    iTT Student
    Join Date
    Dec 2009
    Location
    gujrat/pakistan
    Age
    44
    Posts
    3

    Re: c++ calculator program code

    uffffffffffff itni mistakes.plz u should prepare ur lesson.

  13. #13
    iTT Captain Rahi's Avatar
    Join Date
    Feb 2009
    Location
    Karachi
    Age
    61
    Posts
    1,198

    Re: c++ calculator program code

    شیر کرنے کا شکریہ

  14. #14
    Hum sab umed se hain... zafar bhutta's Avatar
    Join Date
    Dec 2010
    Location
    rahim yar khan
    Age
    33
    Posts
    318

    Re: c++ calculator program code

    Quote Originally Posted by nicerana1 View Post
    muja complete c++ book urdu main chiaya kahan se mile gi???????????????????????

    mughe bhe agar kisi k pass he to plz mughe pm kar den
    thnks

  15. #15
    Senior Student Adnan Ahmad Khan's Avatar
    Join Date
    Aug 2010
    Location
    Bannu/Pakisatn
    Age
    27
    Posts
    261

    Re: c++ calculator program code

    Nice yara...
    ma nay tho abi dekha hai,,,
    If you want to be alive forever, Then DIE for others...

  16. #16
    Senior Student
    Join Date
    Jun 2011
    Location
    Pakistan
    Posts
    134

    Re: c++ calculator program code

    thanks for sharing us

  17. #17
    Senior Student
    Join Date
    Mar 2010
    Location
    pa
    Posts
    99

    Re: c++ calculator program code

    thanx

  18. #18
    Senior Student
    Join Date
    Mar 2010
    Location
    pa
    Posts
    99

    Re: c++ calculator program code

    good

  19. #19
    iTT Student
    Join Date
    May 2011
    Location
    pakistan
    Posts
    54

    Re: c++ calculator program code

    goood
    As rule man is fool;
    When its hot he wants it cool;
    when its cool ;
    he wants it hot ;
    always wanting what is not ;

  20. #20
    Senior Student
    Join Date
    Feb 2008
    Age
    38
    Posts
    84

    Re: c++ calculator program code

    Bhai jb main ic ko compile krta hn to 4 errors ati hn

Page 1 of 2 12 LastLast

Similar Threads

  1. World unlock calculator 4.4
    By khawajaasi in forum Applications
    Replies: 8
    Last Post: 4th August 2012, 03:38 PM
  2. Ancient calculator..!!!
    By Mavi in forum Articles
    Replies: 18
    Last Post: 12th October 2009, 02:09 AM

Tags for this Thread

Posting Permissions

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