my program runns but it isnt coming out right, i need to have on the left side my input*.01*cash and on the right side the chas sequencing 1-20
the problem is the cash numbers are counting more than once before going on to the next number for example:
1
1
1
1
2
2
2
and on the left my input that had been multiple following across down keeps having the letter "e" after each time it shows a number... this is what i am told to do...Produce a tow-column table with column headings showing P% of the amounts $1,$2,3$,...,20$. P is to be the input.
Please help me get this right i am new and horrible to this, please help, (been trying for 2 hours now)
i have my crappy working source code that outputes the wrong things
#include <iostream.h>
#include <conio.h>
int main()
{
double percentage,num2;
cout<<"Please insert percentage: ";
cin>>percentage;
num2=percentage*.01;
for(double cash=1;cash<=20;cash=cash+1)
{
num2=num2*cash;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
cout.width(10);cout<<cash<<endl;
cout<<num2<<endl;
}
cout<<endl;
return(0);