Click here to Skip to main content
15,904,497 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
ex:
2 x 2 = 4 3 x 2 = 6
2 x 3 = 6 3 x 3 = 9
2 x 4 = 8 3 x 4 = 12
Posted
Updated 8-Dec-13 19:22pm
v2
Comments
ridoy 9-Dec-13 1:00am    
That certainly not a question.Seems like a homework, what have you tried?
Sergey Alexandrovich Kryukov 9-Dec-13 1:22am    
Why did you answer then? To take out the last chance to learn something from OP? :-)
Really, this is not help...
—SA
ridoy 9-Dec-13 1:25am    
I didn't answer this question, only commented asking OP what had he done and asking the answerer what OP wants.
Sergey Alexandrovich Kryukov 9-Dec-13 1:35am    
Ah, sorry, I've been confused. You didn't...
—SA

1 solution

try this code:
C++
int i=0,sindex=1,eindex=10,n=2,ans=0;
for(i=sindex;i<=eindex;i++)
{
   ans=i*n;
   printf("%d x %d = %d\n",n,i,ans);
}
 
Share this answer
 
Comments
ridoy 9-Dec-13 1:02am    
Upvoted, but a n++ will give the output as like OP wants.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900