I am getting an error,
in miracle (yes I am installing a dif compiler) I am still new at this and will take all information as constructive. ThanksParse Error, expecting `CASE' or `DEFAULT' or `'}''
'switch(pay) { Default 1: set pay = 10'
Code:#include <stdio.h> maian () { char name [30]; int pay = 0; /*selected from case group by alph corispondant # */ int hours = 0; /*user input with if elas statments */ int hlhrs = 0; /*user input in conjunction with the if eals statments */ int ot = 0; /*mathmatical calculation with in the if eals than statments*/ int othol = 0; int check = 0; /*total amount of pay for the week*/ printf ("What is your Name?"); scanf ("%s", name); printf ("Good Day to you %s."); printf ("%s" "please chose one of the following choses so we know your hourly pay."); printf ("1 : $10.00 an hour."); printf ("2 : $20.00 an hour."); printf ("3 : $30.00 an hour."); printf ("4 : $50.00 an hour."); scanf ("%d", pay); switch(pay) { Default 1: set pay = 10; Break; case 2: pay = 20; break; case 3: pay = 30; break; case 4: pay = 50; break; } //end switch printf ("So How many Hours did you work?"); scanf ("%d", hours); if (hours < = 40 ) { pay * hours = check printf ("Your pay this week will be $,%check"); } else if (hours > 40) { printf ("How many Holiday and Sunday Hours did you have? IF any!"); scanf ("%d", hlhrs); Printf ("How many Overtime hours did you work? If any!"); scanf ("%d", ot); (hlhrs * 2) + (ot * 1.5) + hours - (hlhrs + ot) = check }// end if eals printf ("Your pay for the week will be $,&check"); printf ("Do you want to know your yearly income with no Overtime, Sunday or Holiday pay?"); }



LinkBack URL
About LinkBacks



