0
Why wont this work?
11 Antworten
+ 2
https://code.sololearn.com/cYX6lU3B33rC/?ref=app
You'd like to see smth like this one?
It's a multiplication table for a and b; a is your input, b changes between 1 and 10
+ 8
You redefined "a" in the for loop. Try this.
#include <iostream>
using namespace std;
int main() { int a;
cin>>a;
for(a;a<=10;a+=a)
{cout<<a;}
return 0;
}
+ 2
//hope this code helps you
#include <iostream>
using namespace std;
int main()
{
int b, c;
cin>>b;
for(int a=0;a<=10;a++)
{
c=b*a;
cout<<c<<"\n";
}
return 0;
}
+ 2
your errors
you redefined 'a' in for loop, initialization expression & conditional expression is not correct and you didn't write command for print multiplication table for given number
+ 1
You're welcome!
+ 1
oh ok thanks @sreejit
0
it's a code to display the multiplication table for a number given by the user.
pls help.
0
WOW!!! THANKS A LOT!! I WANTED TO CHOOSE BOTH OF YOUR ANSWERS AS THE BEST.
0
Thanks @AlexSweetheart.
0
Thanks @ArchanaWadhwani