What should I do to extend output values in c++ -


this program converts celsius degrees fahrenheit degrees , kelvin. when run code in dev c++ celsius values going 2 300. how code output celsius values starting -300 , ending @ 300?
set cels = -300 in loop. why output start 2?

#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { double cels, fah, kel, cels2fah, cels2kel, fah2cels, fah2kel; cout<<"my name \n"; cout<<"program 8.0 "<<endl; cout<<"\n\n"; cout<<"celsius     fahrenheit        kelvin \n"    <<"degrees      degrees         --------\n"    <<"--------    -----------      --------\n";   for(cels = -300; cels<= 300; cels++) {  cels2fah = (cels*9.0/5)+32.0;  cels2kel = cels+273.15;  setprecision(4.0);  cout<<setw(3)<< cels <<"    "     <<setw(12)<< cels2fah <<"   "     <<setw(14)<< cels2kel <<"   \n"; } system("pause"); return 0; } 

i think output scrolling has many lines hold in buffer on screen (tried on vs 2010/xp). final output has lines 2 onwards 300.

don't worry, output printing unforunately not seen in final window on windows @ least.

try logging output output file instead.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -