there is something seriously wrong with this...
-
ok, i tried to make this code awhile ago, and it doesnt work at all, and i was wondering if someone could help me figure it out?? But please, not to sound rude, but for the sake of learning something, try to explain it in the simplest terms you can what was wrong, so I can avoid doing that mistake again
#include <iostream> #include <iomanip> using namespace std; void main() {//start int i, j, number; cout<<setw(40)<<"Multiplication Chart"<<endl<<endl; cout>>"This is a multiplication Chart"<<endl<<endl cout<<"please enter a number between 1 and 17 for the table to reach up to. Numbers larger then 17 will NOT work"<<endl; cin>>number; for (i=0; i<number; i++) ( cout<<i<<"I"; for (j=0; j<number; j<+) cout<<setw(3) i*j; } cout<<endl; } system ("PAUSE"); }
:I
-
ok, i tried to make this code awhile ago, and it doesnt work at all, and i was wondering if someone could help me figure it out?? But please, not to sound rude, but for the sake of learning something, try to explain it in the simplest terms you can what was wrong, so I can avoid doing that mistake again
#include <iostream> #include <iomanip> using namespace std; void main() {//start int i, j, number; cout<<setw(40)<<"Multiplication Chart"<<endl<<endl; cout>>"This is a multiplication Chart"<<endl<<endl cout<<"please enter a number between 1 and 17 for the table to reach up to. Numbers larger then 17 will NOT work"<<endl; cin>>number; for (i=0; i<number; i++) ( cout<<i<<"I"; for (j=0; j<number; j<+) cout<<setw(3) i*j; } cout<<endl; } system ("PAUSE"); }
:I
Pathetic wrote:
it doesnt work at all,
Aside from the syntax errors, what does it do compared to what it's supposed to do?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
ok, i tried to make this code awhile ago, and it doesnt work at all, and i was wondering if someone could help me figure it out?? But please, not to sound rude, but for the sake of learning something, try to explain it in the simplest terms you can what was wrong, so I can avoid doing that mistake again
#include <iostream> #include <iomanip> using namespace std; void main() {//start int i, j, number; cout<<setw(40)<<"Multiplication Chart"<<endl<<endl; cout>>"This is a multiplication Chart"<<endl<<endl cout<<"please enter a number between 1 and 17 for the table to reach up to. Numbers larger then 17 will NOT work"<<endl; cin>>number; for (i=0; i<number; i++) ( cout<<i<<"I"; for (j=0; j<number; j<+) cout<<setw(3) i*j; } cout<<endl; } system ("PAUSE"); }
:I
-
ok, i tried to make this code awhile ago, and it doesnt work at all, and i was wondering if someone could help me figure it out?? But please, not to sound rude, but for the sake of learning something, try to explain it in the simplest terms you can what was wrong, so I can avoid doing that mistake again
#include <iostream> #include <iomanip> using namespace std; void main() {//start int i, j, number; cout<<setw(40)<<"Multiplication Chart"<<endl<<endl; cout>>"This is a multiplication Chart"<<endl<<endl cout<<"please enter a number between 1 and 17 for the table to reach up to. Numbers larger then 17 will NOT work"<<endl; cin>>number; for (i=0; i<number; i++) ( cout<<i<<"I"; for (j=0; j<number; j<+) cout<<setw(3) i*j; } cout<<endl; } system ("PAUSE"); }
:I
There were a few syntax errors in your program. Besides that, if you were looking to start with a simple multiplication program, I just wrote one for you:
#include <iostream>
void main()
{
int number, limit = 10;
cout<<"Multiplication Chart"<<endl<<endl;
cout<<"please enter a number to view multiplication chart ";
cin>>number;
cout<<endl;
for(int i=1; i<= limit; ++i)
{
cout<<number<<" x "<<i<< " = "<<number*i<<endl;
}
cout<<endl;
}Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
There were a few syntax errors in your program. Besides that, if you were looking to start with a simple multiplication program, I just wrote one for you:
#include <iostream>
void main()
{
int number, limit = 10;
cout<<"Multiplication Chart"<<endl<<endl;
cout<<"please enter a number to view multiplication chart ";
cin>>number;
cout<<endl;
for(int i=1; i<= limit; ++i)
{
cout<<number<<" x "<<i<< " = "<<number*i<<endl;
}
cout<<endl;
}Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Pathetic wrote:
it doesnt work at all,
Aside from the syntax errors, what does it do compared to what it's supposed to do?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne