Calculator ki coding koi bata de or thora smja b de plz
plz plz
Calculator ki coding koi bata de or thora smja b de plz
plz plz
LOVE IS LIFE
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..
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]
Bookmarks