Results 1 to 3 of 3

Thread: Calculator ki coding koi bata de or thora smja b de plz

  1. #1
    Nadia rai is offline Advance Member
    Last Online
    26th September 2021 @ 04:01 PM
    Join Date
    02 Aug 2010
    Age
    33
    Gender
    Female
    Posts
    717
    Threads
    201
    Credits
    1,257
    Thanked
    32

    Default Calculator ki coding koi bata de or thora smja b de plz

    Calculator ki coding koi bata de or thora smja b de plz
    plz plz
    LOVE IS LIFE

  2. #2
    -Talal- is offline Senior Member+
    Last Online
    25th May 2012 @ 10:49 PM
    Join Date
    06 Dec 2009
    Age
    35
    Posts
    75
    Threads
    3
    Credits
    0
    Thanked
    9

    Default

    Yeh coding C++ mai hain,,, mjy sirf C++ hi ati hai...

    Code:
    #include <iostream.h>
    #include <iomanip.h>
    void main()
    {
    	int a,b;
    	char op;
    	cout<<"Enetr the first value  "<<endl;
    	cin>>a;
    	cout<<"enter the second value  "<<endl;
    	cin>>b;
    	cout<<"Enter ur choice u want"<<endl;
    	cout<<"1=add ,2=sub, 3=mul 4=div  = "<<endl;
    	cin>>op;
    	switch(op)
    	{
    	case '1':
    		cout<<"Addition = "<<(a+b)<<endl;
    		break;
    	case '2':
    		cout<<"Sub = "<<(a-b)<<endl;
    		break;
    	case '3':
    		cout<<"Multiply = "<<(a*b)<<endl;
    		break;
    	case'4':
    		cout<<"Div = "<<(a/b)<<endl;
    		break;
    		cout<<endl;
    	default:
    		cout<<"An error has occured"<<endl;
    	}
    }

    sab kuch saaf saaf likha hai thora sa samjhain samajh aa jay gi,, agar kahin per problem ho to bta dain aapko smjha dia jay ga ,,
    Thanks..

  3. #3
    Urduadsense's Avatar
    Urduadsense is offline Senior Member
    Last Online
    28th February 2019 @ 06:26 PM
    Join Date
    18 Apr 2009
    Location
    Bhakkar
    Age
    34
    Gender
    Male
    Posts
    1,440
    Threads
    51
    Credits
    72
    Thanked
    108

    Default

    Thanks Brother. Ap ne switch command use ki he. yehi program if statement me bhi tiar kia ja skta he. anyway thanks
    [URL="."][COLOR=Red][B][COLOR=Magenta]Read ITD Thread[/COLOR] | Cheap Shared hosting, [COLOR=Blue]Reseller Hosting[/COLOR], [COLOR=DarkGreen]Master Reseller[/COLOR], [COLOR=Sienna]Alpha Reseller Hosting & [COLOR=DarkSlateGray]Domains[/COLOR]
    [/COLOR][/B][/COLOR][/URL]

Similar Threads

  1. Solved Thora sa confuce hu
    By Rajkumar.... in forum Solved Problems (IT)
    Replies: 6
    Last Post: 23rd June 2015, 04:56 PM
  2. thora-ammal
    By ABDULLAH. in forum Sunnat aur Hadees
    Replies: 3
    Last Post: 23rd September 2011, 03:35 AM
  3. Thora Neechay
    By ~*hiway*~ in forum Tanz-o-Mazah
    Replies: 7
    Last Post: 17th August 2009, 07:45 PM
  4. thora se Muskraye
    By Confuse in forum Tanz-o-Mazah
    Replies: 2
    Last Post: 19th June 2009, 08:54 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
  •