Results 1 to 11 of 11

Thread: calculater with 9 functions

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Motri's Avatar
    Motri is offline Advance Member
    Last Online
    16th January 2024 @ 01:27 PM
    Join Date
    14 Oct 2013
    Location
    Sargodha
    Age
    27
    Gender
    Male
    Posts
    770
    Threads
    67
    Credits
    1,924
    Thanked
    58

    Post calculater with 9 functions

    اس کوڈ کو کاپی کرکے پیسٹ کریں
    dave- سی پلس پلس
    میں اور رن کریں



    #include <cstdlib>
    #include <iostream>
    #include<math.h>

    using namespace std;

    int main(int argc, char *argv[])
    {
    float a,b;
    int c;
    int z;
    cout<<"\t\t *****\n****\n***\n**\n* Calculater By Rizwan *****\n****\n***\n**\n* "<<endl;
    cout<<"Press 1 For Addition"<<endl;
    cout<<"Press 2 For Minus "<<endl;
    cout<<"Press 3 For Multiply"<<endl;
    cout<<"press 4 For Deviding"<<endl;
    cout<<"press 5 For Multiple "<<endl;
    cout<<"press 6 For finding temprature •c to kalvin"<<endl;
    cout<<"press 7 For finding temprature F to •c"<<endl;
    cout<<"press 8 For finding temprature •c to F"<<endl;
    cout<<"Press 9 For Circum Ference and area Of circle\n";

    cin>>z;
    if(z==1)
    {cout<<" \t\t Addition \n Enter First Number"<<endl;
    cin>>a;
    cout<<"Enter second Number"<<endl;
    cin>>b;
    cout<<"Sum is="<<a+b<<endl;
    }
    else if(z==2)
    {cout<<" \t\t Subtraction \n Enter First Number"<<endl;
    cin>>a;
    cout<<"Enter second Number"<<endl;
    cin>>b;
    cout<<"Diffrence is="<<a-b<<endl;
    }
    else if(z==3)
    {cout<<" \t\t Multiplecation \n Enter First Number"<<endl;
    cin>>a;
    cout<<"Enter second Number"<<endl;
    cin>>b;
    cout<<"Result is is="<<a*b<<endl;
    }
    else if(z==4)
    {cout<<" \t\t Deviding and Reminder \n Enter First Number"<<endl;
    cin>>a;
    cout<<"Enter second Number"<<endl;
    cin>>b;
    cout<<"Result is="<<a/b<<endl;
    }
    else if(z==5)
    {cout<<" \t\t Multiple \n Enter First Number"<<endl;
    cin>>a;
    cout<<"Enter second Number"<<endl;
    cin>>b;
    cout<<"Result is="<<a*b<<endl;
    }
    else if(z==6)
    {cout<<" \t\t Temprature \n Enter Degree centigrade temprature"<<endl;
    cin>>a;
    cout<<"Kalvin temprature is="<<a+273<<"K"<<endl;
    }
    else if(z==7)
    {cout<<" \t\t Temprature \n Enter FarinHight temprature"<<endl;
    cin>>a;
    cout<<"DegreeCentigrade Temprature is="<<(5/9*a)-32<<endl;
    }
    else if(z==8)
    {cout<<" \t\t Temprature \n Enter DegreeCentigrade temprature"<<endl;
    cin>>a;
    cout<<"Farin Temprature is="<<(9/5*a)+32<<endl;
    }
    else if(z==9)
    {cout<<"Enter Radious of Circle"<<endl;
    cin>>a;
    cout<<"press 1 for area and 2 for circum ference"<<endl;
    cin>>c;
    if(c==1)
    cout<<"Area is="<<a*a*3.14<<endl;
    else if(c==2)
    cout<<"Circum ference is="<<2*3.14*a<<endl;
    }
    else
    cout<<"invalid input\n";


    system("PAUSE");
    return EXIT_SUCCESS;
    }
    Last edited by SHonas; 5th March 2015 at 11:29 AM. Reason: type urdu (reason: roman urdu or english not allowed)

Similar Threads

  1. Ab Ap Android Games yahan se download kar sakty hein
    By meher78 in forum Android Zone
    Replies: 374
    Last Post: 18th May 2014, 01:22 PM
  2. Required scientific calculater for nokia 2690 java
    By KambohNauman in forum Mobile phones problems and Help Zone
    Replies: 4
    Last Post: 4th February 2014, 01:48 PM
  3. functions
    By sohaib1990 in forum Educational Help
    Replies: 0
    Last Post: 25th May 2012, 01:01 PM
  4. >>>>>>>>>>>>pre defined functions in excel
    By mkasikandar in forum English IT Zone
    Replies: 2
    Last Post: 15th September 2009, 10:04 AM
  5. SQL Functions Programmer’s Reference
    By oralover2006 in forum English IT Zone
    Replies: 2
    Last Post: 28th May 2009, 10:59 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
  •