screenblack fiz um jeito aquie nao deu erro nenhume funcionou
#include <stdio.h>
#include <conio.h>
#include <string.h>
void primeiro();
void segundo();
void resposta();
void terceiro();
int main()
{
primeiro(); //CHAMA 1ª FUNCAO QUE DIGITA O PRIEMIRO VAR
}
void primeiro(){
char c = "\0";
char num[1000] = "\0" ;
printf("Digite o primeiro valor\n"
while (!kbhit() != EOF && c != '\n' )
{
if(kbhit()){
c=getch();
if ( c == '0'){
strcat(num,"0"
system("cls"
printf("%s", &num);
}
if ( c == '1'){
strcat(num,"1"
system("cls"
printf("%s", &num);
}
if ( c == '2'){
strcat(num,"2"
system("cls"
printf("%s", &num);
}
if ( c == '3'){
strcat(num,"3"
system("cls"
printf("%s", &num);
}
if ( c == '4'){
strcat(num,"4"
system("cls"
printf("%s", &num);
}
if ( c == '5'){
strcat(num,"5"
system("cls"
printf("%s", &num);
}
if ( c == '6'){
strcat(num,"6"
system("cls"
printf("%s", &num);
}
if ( c == '7'){
strcat(num,"7"
system("cls"
printf("%s", &num);
}
if ( c == '8'){
strcat(num,"8"
system("cls"
printf("%s", &num);
}
if ( c == '9'){
strcat(num,"9"
system("cls"
printf("%s", &num);
}
if ( c == '+'){
printf("\n\n\no numero e : %s \n", &num);
int numw;
numw = atoi(num);
printf("NUMERO %d\n\n\n\n", numw);
segundo(c, numw);
}
}
}
}
void segundo(c, numw){
char numd[1000] = "\0" ;
printf("Digite outro valor\n"
while (!kbhit() != EOF && c != '\n' )
{
if(kbhit()){
c=getch();
if ( c == '0'){
strcat(numd,"0"
system("cls"
printf("%s", &numd);
}
if ( c == '1'){
strcat(numd,"1"
system("cls"
printf("%s", &numd);
}
if ( c == '2'){
strcat(numd,"2"
system("cls"
printf("%s", &numd);
}
if ( c == '3'){
strcat(numd,"3"
system("cls"
printf("%s", &numd);
}
if ( c == '4'){
strcat(numd,"4"
system("cls"
printf("%s", &numd);
}
if ( c == '5'){
strcat(numd,"5"
system("cls"
printf("%s", &numd);
}
if ( c == '6'){
strcat(numd,"6"
system("cls"
printf("%s", &numd);
}
if ( c == '7'){
strcat(numd,"7"
system("cls"
printf("%s", &numd);
}
if ( c == '8'){
strcat(numd,"8"
system("cls"
printf("%s", &numd);
}
if ( c == '9'){
strcat(numd,"9"
system("cls"
printf("%s", &numd);
}
if ( c == '+'){
int segundoa;
int segundo;
segundo = atoi(numd);
segundoa = numw + segundo;
printf("A RESPOSTA e %d: ", segundoa);
terceiro(c, segundoa, numw);
}
}
}
}
void terceiro(c, segundoa, numw){
char numf[1000] = "\0" ;
printf("Digite outro valor\n"
while (!kbhit() != EOF && c != '\n' )
{
if(kbhit()){
c=getch();
if ( c == '0'){
strcat(numf,"0"
system("cls"
printf("%s", &numf);
}
if ( c == '1'){
strcat(numf,"1"
system("cls"
printf("%s", &numf);
}
if ( c == '2'){
strcat(numf,"2"
system("cls"
printf("%s", &numf);
}
if ( c == '3'){
strcat(numf,"3"
system("cls"
printf("%s", &numf);
}
if ( c == '4'){
strcat(numf,"4"
system("cls"
printf("%s", &numf);
}
if ( c == '5'){
strcat(numf,"5"
system("cls"
printf("%s", &numf);
}
if ( c == '6'){
strcat(numf,"6"
system("cls"
printf("%s", &numf);
}
if ( c == '7'){
strcat(numf,"7"
system("cls"
printf("%s", &numf);
}
if ( c == '8'){
strcat(numf,"8"
system("cls"
printf("%s", &numf);
}
if ( c == '9'){
strcat(numf,"9"
system("cls"
printf("%s", &numf);
}
if ( c == '+'){
int tercero;
int terceroa;
tercero = atoi(numf);
terceroa = segundoa + tercero;
printf("\nA resposta e %d: \n", terceroa);
terceiro(c, terceroa);
}
}
}
}
e so ir colocando a operação ele vi somando 1+1=2+3=5 etc.... etc.. e tal
agora e implementar multiplicação divisao e outros jeitos, o unico problema e que quando eu compilo aparece um warning
18 C:\defin.c [Warning] initialization makes integer from pointer without a cast