#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int choix;
double Rpm, Result;
// Presentation
printf("This program will **** (censored)\n\n");
// List of calculation choices
printf(" 1. Hello 2. Blablabla 3. Third\n");
printf(" 4. Another blabla\n\n");
while(1)
{
printf("Option #");
scanf("%d", &choix);
printf("Enter the ", choix);
switch (choix) // choix awaits for a scanned number from the input (keyboard) at ("%d", &choix)
{
case 1:
printf("Rpm: ");
scanf("%lf", &Rpm);
Result = 360000/Rpm;
printf("The value is = %.lf dollars.\n\n",Result);
break;
case 2:
printf("Rpm: ");
scanf("%lf", &Rpm);
Result = 240000/Rpm;
printf("A whole %.lf peanuts.\n\n",Result);
break;
case 3:
printf("Rpm: ");
scanf("%lf", &Rpm);
Result = 160000/Rpm;
printf("Aaaaaaaaaaaaa = %.lf turds.\n\n",Result);
break;
case 4:
printf("Rpm: ");
scanf("%lf", &Rpm);
Result = 180000/Rpm;
printf("Numer 4 mofo = %.lf .\n\n",Result);
break;
default: // If the user enters an invalide option, the following message will show up:
printf("number, from 1 to 4, corresponding to what you want to know. The number you entered was not valid.\n\n");
} // End case
} // End while(1)
getch();
return 0;
}