If it's a compiler error, the output would be helpful. If it's a logical error, the actual result vs. expected result would be good.
~Sovereign
I'm making a calculator to compute charges for playing at skate park.. and i did some errors.. can you help me to detect the errors..
#include<stdio.h>
#include<stdlib.h>
void main()
{
float totalprice, totaladult, totalchild, totalsocks, totalshoes;
int childtimetotal, adulttimetotal, adultnumber, childnumber, socksnumber, shoesnumber, adulttimenumber, childtimenumber;
printf("Please enter the number of adults: ");
scanf("%d", &adultnumber);
printf("\n1-15 minutes");
printf("\n2-30 minutes");
printf("\n3-45 minutes");
printf("\nPlease choose the total time the adults want to play: ");
scanf("%d",adulttimenumber);
if (adulttimenumber=1)
{
adulttimetotal=10;
}
else if (adulttimenumber=2)
{
adulttimetotal=20;
}
else (adulttimenumber=3);
{
adulttimetotal=30;
}
printf("\nPlease enter the number of children: ");
scanf("%d", &childnumber);
printf("\n1-15 minutes");
printf("\n2-30 minutes");
printf("\n3-45 minutes");
printf("\nPlease choose the total time the children want to play: ");
scanf("%d",childtimenumber);
if (childtimenumber=1)
{
childtimetotal=7;
}
else if (childtimenumber=2)
{
childtimetotal=14;
}
else (childtimenumber=3);
{
childtimetotal=21;
}
{
printf("\nPlease enter the number of pair of socks bought: ");
scanf("%d", &socksnumber);
totalsocks=socksnumber*4;
}
{
printf("\nPlease enter the number of pair of shoes rent: ");
scanf("%d", &shoesnumber);
totalshoes=shoesnumber*3;
}
{
totalprice=adultnumber*adulttimetotal + childnumber*childtimetotal + totalsocks + totalshoes;
printf("\nThe total price is: %f", totalprice);
}
system("PAUSE");
}

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic