Thought I had it all figured out, but i can't get it to compile properly!! grrrrrrrr!!
Basically everything is good, it compiles, but then it crashes and says that either 'meter', 'inlet', or 'pressure' is being USED WITHOUT BEING INITIALIZED. So annoying, what does that even mean??
Code:
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
int main (void)
{
char lights, inlet, pressure;
int meter;
printf ("\nCheck Your Status Lights, are they Green, Amber, or Red?");
printf ("\nEnter 'G' for GREEN, 'A' for AMBER, or 'R' for RED ==> \n");
scanf("%c", &lights);
if (lights == 'G' || lights == 'g')
{
printf ("\nDo Restart Procedure!\n" );
}
else if (lights == 'A' || lights == 'a')
{
printf( "\nCheck Fuel line Service routine\n" );
}
else
{
printf ("\nShut off all input lines and check meter #3\n" );
printf ("\n\nPlease Enter the ammount on meter, to the nearest whole number ");
scanf ("%i", &meter);
}
if (meter >= 50)
{
printf ("\n\nMeasure Flow Velocity in inlet 2-B");
printf ("\nIs inlet volocity High, Low or Normal?");
printf ("\n\n PRESS 'H' for HIGH, 'L' for LOW, or 'N' for NORMAL==> ");
scanf ("%i", &inlet);
if (inlet == 'H' || inlet == 'h' || inlet == 'L' || inlet == 'l')
{
printf ("\nREFER UNIT FOR FACTORY SERVICE");
}
}
else if (inlet == 'N' || 'n')
{
printf ("\nRefer to Inlet Service Manual");
}
else
{
printf ("\n\ncheck main line for test pressure");
printf ("\nIs main line pressure High, Low or Normal?");
printf ("\n\n PRESS 'H' for HIGH, 'L' for LOW, or 'N' for NORMAL==> ");
scanf ("%i", &pressure);
if (pressure == 'H' || pressure == 'h' || pressure == 'L' || pressure == 'l')
{
printf ("\nREFER TO MAIN LINE MANUEL");
_getch();
printf("\n\n\nPRESS ANY KEY TO EXIT");
}
else
{
printf ("\nREFER TO MOTOR SERVICE MANUEL");
_getch();
printf("\n\n\nPRESS ANY KEY TO EXIT");
}
}
}