just a couple things outta place.... I *think*
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int choice, numAdd, temp, numTotal = 0;
printf("Welcome to Karl's easy math Calculator!\n\n");
do
{
printf("1: Add\n2: Subtact\n3: drivde\n4: Exit\n\nWhat you want to do?\n");
scanf("%d%*c",&choice);
/******************************************/
switch (choice)
{
case 1 : { printf("How many numbers are you going to add?\n");
scanf("%d", &numAdd);
/******************************************/
for(; numAdd > 0; numAdd--)
{
printf("Whats a number that you want to add?");
scanf("%d%*c", &temp);
numTotal += temp;
temp = 0;
}
/******************************************/
printf("Thats up to %d\n\n", numTotal);
}
break;
default : { printf("Unknown Number, plaese type again"); } break;
}
/******************************************/
} while ((choice < 1) || (choice > 4));
system("PAUSE");
return 0;
}