hey guys, i think i got the hang of it a little, here's what i did so far.
#include<stdio.h>
int add(int a, int b);
int mult( int c, int d);
int div(int e, int f);
int sub(int g,int h);
int w,x,y,ans;
int add( int a, int b)
{
int sum;
sum = a+b;
return sum;
}
int mult( int c, int d)
{
int pro;
pro = c*d;
return pro;
}
int div(int e,int f)
{
int qou;
qou = e/f;
return qou;
}
int sub(int g, int h)
{
int res;
res=g-h;
return res;
}
int main(void)
{
do
{
printf("\nDame un numero");
scanf("%i",&x);
printf("\n choose an operation by typing the appropriate number");
printf("\n1.addition");
printf("\n2.Multiplication");
printf("\n3.Division");
printf("\n4.Subtraction");
printf("\n5.leave");
scanf("%i",&w);
printf("\nDame un otro numero");
scanf("%i",&y);
if(w==1)
{
ans=add(x,y);
}
if(w==2)
{
ans=mult(x,y);
}
if(w==3)
{
ans=div(x,y);
}
if(w==4)
{
ans=sub(x,y);
}
if(w==5)
{
printf("\nbye");
}
printf("\n%i",ans);
}while(w=!5);
}