I am using Visual c++ 6
Every time i run this program i got a message
runtime error.
Can anyone tell me what's wrong in my program?
Thank
#include<stdio.h>
#define SMALL_PIZAA 8.50
#define MEDIUM_PIZZA 12.65
#define LARGE_PIZZA 18.50
#define SMALL_SLICE 4
#define MEDIUM_SLICE 8
#define LARGE_SLICE 12
void getClassData(int *, int *, int *, int *, double *);
void menu(void);
/************************************************** ***************************
* *
* Main *
* *
************************************************** ***************************/
int main(void)
{
int student, totSmPizza, totMdPizza, totLgPizza;
double money;
menu();
getClassData(&student, &totSmPizza, &totMdPizza, &totLgPizza, &money);
return 0;
}
/************************************************** ***************************
* *
* Pizza Menu *
* *
************************************************** ***************************/
void menu(void)
{
printf("\n\n");
printf("\t\t************************************** **************\n");
printf("\t\t* *\n");
printf("\t\t* Pizza Menu *\n");
printf("\t\t* *\n");
printf("\t\t************************************** **************\n");
printf("\t\t* *\n");
printf("\t\t* Size Price Slice *\n");
printf("\t\t* **** ***** ***** *\n");
printf("\t\t* *\n");
printf("\t\t* Small $8.50 4 *\n");
printf("\t\t* *\n");
printf("\t\t* Medium $12.65 8 *\n");
printf("\t\t* *\n");
printf("\t\t* Large $18.50 12 *\n");
printf("\t\t* *\n");
printf("\t\t************************************** **************\n");
printf("\n\n");
return;
}
/************************************************** ***************************
* *
* Get Class Date *
* *
************************************************** ***************************/
void getClassData(int *student, int *smPizza, int *mdPizza, int *lgPizza, double *money)
{
printf("\t\tEnter how many students in your class: ");
scanf("%d", student);
printf("\n\n\t\tHow many small size pizza you want to order? ");
scanf("%d", smPizza);
printf("\t\tHow many medium pizza you want to order? ");
scanf("%d", mdPizza);
printf("\t\tHow many large pizza you want to order? ");
scanf("%d", lgPizza);
printf("\n\n\t\tEnter how much money you have: ");
scanf("%lf", money);
return;
}
*******************output******************
Enter how many students in your class: 25
How many small size pizza you want to order? 3
How many medium pizza you want to order? 3
How many large pizza you want to order? 3
Enter how much money you have: 333.33
runtime error R6002
- floating point not loaded
Press any key to continue