help on this enrollment system in cprogramming when I run the programming the output sometimes fall through example when i enter the student number name and address but when i press enter in the address it skips the scanf in the status and goes to the gender it alse does it when I enter the rate it skips the no of units can you guys help me out
#include<stdio.h>
#include<conio.h>
main()
{
int studentNumber, units, yearLevel, cash, statusLocal;
char studentName[50], address[50], status, gender,course[10], birthday;
float rate , mis , cashTendred , accessment, tutionFee, change;
printf(" Enter Student Number : ");
scanf("%d",&studentNumber);
printf(" Enter Student Name : ");
scanf("%s", studentName);
printf(" Enter Address : ");
scanf("%s", &address);
printf(" Birhtday: MM/DD/YY ");
scanf("%s",&birthday);
printf(" Status: M/S ");
scanf("%c", &status);
printf(" Gender: ");
scanf("%c", &gender);
printf("_____________________________________________\n");
printf(" Course : ");
scanf("%s", &course);
printf(" Year Level : ");
scanf("%d" ,&yearLevel);
printf(" Status ([1]Local/[2]International):\n");
scanf("%d",&statusLocal);
printf("______________________________________________\n");
switch(statusLocal)
{
case 1:
{
printf(" Rate per unit: ");
scanf("%5.2f",&rate);
printf(" No of units: ");
scanf("%d",&units);
printf(" Miscellaneos fee: ");
scanf("%5.2f",&mis);
accessment = (rate * units) + mis;
printf("Total Ascessment: %f",accessment);
printf(" Mode of Payment: ([1]cash/[2]installment)");
scanf("%d", &cash);
break;
}
case 2:
{
printf("422222");
}
}
if(cash == 1)
{
tutionFee= accessment * 0.10;
printf(" TuitionFee %5.2f",tutionFee);
}
else
{
tutionFee = accessment / 2;
printf(" Downpayment : ");
printf(" Balance ");
}
printf(" Cash Tendered : ");
scanf("%5.2f", cashTendred);
change = cashTendred - tutionFee;
printf(" Change: %f5.2",change);
getch();
}