Atps calculadora
#include <stdio.h>
#include <math.h>
#include <windows.h>
#include <conio.h>
int main(int argc, char *argv[])
{
char op = 0; int val1 = 0, val2 = 0, res = 0;
while (op != 's')
{
system("title C A L C U L A D O R A!"); system("cls"); system("color 1F"); printf("\t\t\t\t\xC9\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xBB\n"); printf("\t\t\t\t\xBA CALCULADORA \xBA\n"); printf("\t\t\t\t\xC8\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xBC\n"); printf(" \n"); printf("\t\t\t\tEscolha Operacao: \n"); printf("\t\t\t\t(+) Soma. \n"); printf("\t\t\t\t(-) Subtracao. \n"); printf("\t\t\t\t(/) Divisao. \n"); printf("\t\t\t\t(*) Multiplicacao. \n"); printf("\t\t\t\t(E) Exponenciacao \n"); printf("\t\t\t\t(R) Raiz Quadrada. \n"); printf("\t\t\t\t(P) Porcentagem \n"); printf("\t\t\t\t(S) Sair. \n"); printf("\t\t\t\tOpcao: "); op = getch(); printf(" \n\n"); switch (op){ case '+': printf("\t\t\t\tS O M A\n\n"); printf("\t\t\t\tPrimeiro Valor: "); scanf("%d", &val1); printf("\t\t\t\tSegundo Valor: "); scanf("%d", &val2); res = val1 + val2; printf("\n\t\t\t\tSoma de %d + %d = %d", val1, val2, res); break; case '-': printf("\t\t\t\tS U B T R A C A O\n\n"); printf("\t\t\t\tPrimeiro Valor: "); scanf("%d", &val1); printf("\t\t\t\tSegundo Valor: "); scanf("%d", &val2); res = val1 - val2; printf("\n\t\t\t\tSubtracao de %d - %d = %d", val1, val2, res); break; case '*': printf("\t\t\t\tM U L T I P L I C A C A O\n\n"); printf("\t\t\t\tPrimeiro Valor: "); scanf("%d", &val1); printf("\t\t\t\tSegundo Valor: "); scanf("%d", &val2); res = val1 * val2; printf("\n\n\t\t\t\tMultiplicacao de %d * %d =