Hello. I'm still new in programming. (It has been about 2 days since I started reading tutorials online and practicing it). I still have a lot of time, a lot to learn, fortunately the school holiday is long in my local area (about 3 months).
Anyway, sorry for the long introduction. I just want to ask you a question regarding the warning message I got stated in the title.
I'm using an IDE, Microsoft Visual 2010 C++ Express. Please, take a look on this and tell me the part that is needed to be altered so that I solve this problem.
Code://This program is an answer to the question number 1 (now question 2!) given in. /*To convert Fahrenheit to Celcius: substract by 32, multiply by 5, then divide by 9. To convert Celcius to Kelvin; add 273.15. */ #include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { float LOWER, UPPER, STEP; cout << "This program can help you to make a table of conversion of temperature between Fahrenheit, Celcius, and Kelvin.\n"; cout << "Please specify the range of values of Fahrenheit temperature (from lowest to highest)\n"; cout << "and also the desired step (e.g: for 10 steps between range 0 and 100 is: 0,10,20,30... 100).\n"; cout << "by answering the questions given below.\n\n"; cout << "Enter the desired lowest value of Fahrenheit temperature and press ENTER.\n"; cin >> LOWER >> "\n"; cout << "Enter the desired upper value of Fahrenheit temperature and press ENTER.\n"; cin >> UPPER >> "\n"; cout << "Enter the desired steps within the range and press ENTER.\n"; cin >> STEP >> "\n"; //declaring variable. float Fahrenheit, Celcius, Kelvin; cout << setiosflags (ios::left); cout.width(20); cout << "Fahrenheit"; cout << "Celcius"; cout << setiosflags (ios::right); cout.width(20); cout << "Kelvin\n\n"; cout.setf(ios::fixed); cout.precision(2); for (Fahrenheit = LOWER; Fahrenheit <= UPPER; Fahrenheit = Fahrenheit + STEP) { Celcius = ((Fahrenheit - 32)*5)/9; Kelvin = Celcius + 273.15; cout << setiosflags (ios::left); cout.width(20); cout << Fahrenheit; cout << setiosflags (ios::left); cout.width (20); cout << Celcius; cout << setiosflags (ios::right); cout.width(20); cout << Kelvin << "\n"; } system("pause"); return 0; }