Himse
FH is my second home
- Joined
- Jan 31, 2004
- Messages
- 2,179
And this is the reason you had to sell your DaoC account for sex!
ahaha by3333
And this is the reason you had to sell your DaoC account for sex!
const int RAINY = 1;
const int WINDY = 2;
const int SUNNY = 3;
const int TRUE = 1;
const int FALSE = 0;
int weather, take_brolly, take_overcoat, take_sunglasses;
take_brolly = take_overcoat = take_sunglasses = FALSE;
if (weather == RAINY)
take_brolly = TRUE;
else if (weather == WINDY)
take_overcoat = TRUE;
else if (weather == SUNNY)
take_sunglasses = TRUE;
else
printf("ERROR: unknown type of weather\n");
#include<stdio.h>
void main()
{
int CarAge, EngineSize, Convictions;
printf("Please enter the age of your Car, followed by it's engine size and finally the amount of convictions you have had: \n");
scanf("%i%i%i" &CarAge, &EngineSize, &Convictions);
if (CarAge >= 15 && EngineSize >= 2000 && Convictions >= 3)
printf("Policy loaded by 45%");
else if (CarAge >= 15 && EngineSize >= 2000 && Convictions < 3)
printf("Policy loaded by 20%");
else if (CarAge < 15 && EngineSize < 2000 && Convictions < 3)
printf("Policy loaded by 0%");
}
if (iMenuSelection == 1)
{
printf("One selected");
}
else if (iMenuSelection == 2)
{
printf("Two selected");
}
else if (iMenuSelection == 3)
{
printf("Three selected");
}
else if (iMenuSelection == 4)
{
printf("Four selected");
}
else if (iMenuSelection == 5)
{
printf("Five selected");
}
else
{
printf("You didn't enter a valid number");
}
switch (iMenuSelection) // start the switch, using the variable
{
case 1: // if it's equal to 1...
{
printf("One selected");
{
break;
case 2: // if it's equal to 2...
{
printf("Two selected");
{
break;
case 3: // if it's equal to 3...
{
printf("Three selected");
{
break;
case 4: // if it's equal to 4...
{
printf("Four selected");
{
break;
case 5: // if it's equal to 5...
{
printf("Five selected");
{
break;
default: // if it doesn't match any of the above
{
printf("You didn't enter a valid number");
{
}