write a program that create a simple calculator it reads two float numbers NI,N2 and a character CH(+,-,/,*) thyen perform calculation depending upon the type of character enter by user and display result in format n1 op n2=result
write a program that create a simple calculator it reads two float numbers NI,N2 and a character CH(+,-,/,*) thyen perform calculation depending upon the type of character enter by user and display result in format n1 op n2=result
ma ishq-e-kainaat ma zanjeer ho saku
mujh ko hisar-e-zaat ke shar se rahai de
hasib kya ap bhi bscs 1st semester mai ho anyway ye boht asan hai apko bs ye krna hoga...
cout<< "Jo sentence apne likha hai:";
cin>> (N1+N2);
bs isis ko copy paster kerte jain or bs plus ki jaga minus multiply or divide ka sign dalte hain.. calculator ban gaya
Bhai jan pehly 2 float variables declare kar lain n1 aur n2, aur aik character variable op declare kar lain aur phir sab ko cin karwa lain
Phir condition kuch youn lagayein
Code:if(op=='+') cout<<n1+n2 else if(op=='-') cout<<n1-n2 . . . . .
Is tarah tamam arithmetic operation perform kar lain
Bookmarks