Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

closed Print table from 1 to 5 using while loop. What's wrong with this code?

0 votes
asked May 30, 2020 by Shreya Upadhyay (140 points)
closed May 30, 2020 by Shreya Upadhyay
#include<stdio.h>
void main()
{
    int i = 1;
    int j = 1;
    
    while (i<=5)
    {
        while (j<=10)
        {
            printf ("\n %d * %d = %d",i,j,i*j);
            j++;
        }
        i++;
    }
}
closed with the note: I solved and got the answer on my own.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...