Click here to Skip to main content
15,944,958 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
#include <stdio.h>
int main()
{
	int a,b,i,j,product;
	printf("enter the numbers of table you want to see:");
	scanf("%d %d",&a,&b);
	for(i=1;i<=10;i++)
	{
		for(j=a;j<=b;j++)
		{
			product = j * i;
			printf("%d x %d = %d",&j,&i,&product);
			printf("\t");
		}
		printf("\n");
	 } 
	return 0;
}


What I have tried:

I have tried using nested for loops like we do to print tables.
Posted
Updated 14-Oct-18 21:16pm
Comments
KarstenK 16-Oct-18 2:20am    
Why arent you reading the documentation or example code? :-O

1 solution

You are printing the addresses of variables:
printf("%d x %d = %d",&j,&i,&product);
rather that the variable content:
printf("%d x %d = %d", j, i, product);
 
Share this answer
 
Comments
CPallini 15-Oct-18 3:41am    
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