Enviado em 27/08/2019 - 16:17h
boa tarde!
estou dando uma estuda sobre funções, mas meu codigo tem um erro que não consigo achar:
estou dando uma estuda sobre funções, mas meu codigo tem um erro que não consigo achar:
#include <stdio.h>
int ima(int x, int y){
int t;
t = x + y;
return t;
}
int imn(int x, int y){
int t;
t = x - y;
return t;
}
int ivz(int x, int y){
int t;
t = x * y;
return t;
}
float dvd(int x, int y){
float t;
t = x / y;
return t;
}
int main(){
int n;
int opc;
printf("escolha uma opção:\n");
printf("1 +\n2 -\n3 x\n4 /\nopc: ");
scanf("%d", &opc);
printf("digite o número: ");
scanf("%d", &n);
switch(opc){
case 1:
for(int o = 0; o < 13; o++){
printf("%d + %d = %d\n", o, n, ima(n + o));
}
break;
}
return 0;
}
agradeço a quem ajudar!