Ok, new to C++, I bet this is a real easy question.
Every time I input a char, it enters the same char twice to variable. So when I enter "r", and then output it..it outputs "rr"
#include <iostream>
#include <fstream>
using namespace std;
#define errorMsg1 "You must enter 'F' for Fahrenheit or 'C' for Celsius."
#define enterDegreeType "Would you like to convert......\n"
char degreeType;
int main()
{
//clrscr();
cout<<enterDegreeType;
cin>>degreeType;
if (degreeType != 'c' || degreeType !='f')
{
cout <<"\n"<<errorMsg1;
cout <<"You entered "<<degreeType;
}
cout <<degreeType;
return 0;
}
This is what I get.......
"Would you like to convert a Fahrenheit degree or a Celsius degree?
Type 'F' for Fahrenheit or 'C' for Celsius
c
You must enter 'F' for Fahrenheit or 'C' for Celsius.You entered cc
Process returned 0 (0x0) execution time : 1.846 s
Press any key to continue."
Program is clearly not done. I'm just trying to get it to input and check it correctly...