i have to make a program that asks the user to input the psi pressure and have an output based on the input value. i thought i had it f/3igu5-red out but i keep getting the error.
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
pressure.cpp:
Error E2206 pressure.cpp 1: Illegal character ' ' (0xff)
Error E2206 pressure.cpp 1: Illegal character '■' (0xfe)
Error E2206 pressure.cpp 1: Illegal character '#' (0x23)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2141 pressure.cpp 1: Declaration syntax error
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2206 pressure.cpp 1: Illegal character '' (0x0)
Error E2048 pressure.cpp 3: Unknown preprocessor directive: 'i'
Error E2206 pressure.cpp 5: Illegal character '' (0x0)
Error E2228 pressure.cpp 5: Too many error or warning messages
*** 26 errors in Compile ***
here is my code. any help would be greatly appreciated. thank you.
# include <stdio.h>
# include <math.h>
int main(void)
{
double psi;
input(&psi);
printf("Enter the line pressure in psi: ");
scanf("%lf",&psi);
if((psi>= 50) && (psi <=80))
{
printf("\nLine pressure is %f psi.\n"
"Line pressure normal, from 50 to 100 psi.\n"
"System startup in effect", psi);
}
else if((psi>0)&& (psi<50))
{
printf("\nSystem startup cancelled.\n"
"\nLine pressure is %f psi.\n"
"\nLine pressure must be from 50 to 100 psi.",psi);
}
else if((psi>80))
{
printf("\nSystem startup cancelled.\n"
"Line pressure is %f psi.\n"
"Line pressure must be from 50 to 100 psi.",psi);
{
else
{
printf("\nSystem failure - no line pressure.\n"
"Line pressure %c 0 psi.\n"
"Line pressure must be from 50 to 100 psi.",243);
}
return(0);
}
//What are you trying to do here...? This is not right.
printf("\nLine pressure is %f psi.\n""Line pressure normal, from 50 to 100 psi.\n""System startup in effect", psi);
if the pressure is between 50 and 100 the program says:
"Line pressure is 'the value of the psi' psi.
Line pressure normal, from 50 to 100 psi.
System startup in effect."
if it's less than or equal to zero :
"System failure - no line pressure.
Line pressure 'need to make it so the program outputs the less than or equal to sign' 0 psi
Line pressure must be from 50 to 100 psi."
i also need help making it output that symbol. i use the %c notation right?