This is what i have now...
Code:
#include <stdio.h>
int increase(int total, int num)
{
printf("|---------------------|\n");
printf("| %d |\n", total,num);
printf("| |\n");
printf("| |\n");
printf("|---------------------|\n");
}
int main(){
int i=0;
int num=3;
int total=0;
char number;
printf("\nEnter in an a to increase by 3 mph ,or a capital A to increase by 10mph!");
number=getch();
while(i<5){
switch (number)
case 'A':
case 'a':
scanf("%d",increase(total,num)); // I'm trying to get total and num to read in for int total and int num in my prototype function... and have my function add 3 mph every time i press the a key...
total=total+num;
break;
i++;}
getch();
return(0);
}