Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C++
/* c program to find multiplication table up to 10. */
#include <stdio.h>
int main ()
{
    int n, i;
    printf("Enter an integer to find multiplication table: ");
    scanf("%d",&n);
    for((i=1);i<=10;++1)
    {
	 printf("%d * %d = %d\n", n, i, n*i);
    }
    return 0;
 }</stdio.h>
Posted
Updated 24-Mar-15 22:39pm
v4

1 solution

In this line
for((i=1);i<=10;++1)

you are trying to increment the constant (L-value) number 1.
It should be probably the variable i instead.
 
Share this answer
 
Comments
CPallini 25-Mar-15 4:40am    
5.

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