the console doesn't show full result

When i tried to run it, ran successfully but i couldn't see the full result result on the console screen. it shows results from p=8000.



#include<iostream>
#include<math.h>
using namespace std;

int main()
{
float p,v,r,n;
for(p=1000;p<=10000;p=p+1000)
{
for(r=0.10;r<=0.21;r=r+0.01)
{
for(n=1;n<=10;n=n+1)
{
cout<<"P = "<<p<<" r = "<<r<<" n = "<<n;
v=p*(pow((1+r),n));
cout<<" V = "<<v<<"\n";
}
}
}
return 0;
}
Your program is not at fault. You probably have to configure the program that you use to view the output of your program to show more lines.
How should I do it? I am running it on codeblocks.
seems to be a C::B specific issue - http://cpp.sh/6xjmy
closed account (E0p9LyTq)
A workaround, not an ideal situation, is to rewrite your program to output to a file instead of the console.

A quick workaround is to redirect the console output to a file:
http://stackoverflow.com/questions/20155744/how-can-i-redirect-console-output-to-file
Last edited on
Topic archived. No new replies allowed.