Baixe o app para aproveitar ainda mais
Prévia do material em texto
Calculadora em c++ #include <conio.h> #include <iomanip> #include <iostream> #include <stdlib.h> using namespace std; int main() { int a,b; char resp; resp ='s'; while (resp =='s' || resp =='S') { system("cls"); cout<<"\n DIGITE O PRIMEIRO NUMERO"; cin>>a; cout<<"\n DIGITE O SEGUNDO NUMERO"; cin>>b; cout<<"\n A SOMA DOS NUMEROS E :"<<a+b<<endl; cout<<"\n A SUBTRACAO DOS NUMEROS SAO :"<<a-b<<endl; cout<<"\n A DIVISAO DOS NUMEROS SAO :"<<a/b<<endl; cout<<"\n A MULTIPLICACAO DOS NUMEROS SAO :"<<a*b<<endl; cout<<"\n A PORCENTAGEM DOS NUMEROS SAO :"<<a%b<<endl; cout<<"\n VOCE DESEJA CONTINUAR (S/N):"; cin>>resp; } }
Compartilhar