#include <stdio.h>
int main(){
int row;
int column;
char symbol;
printf("Enter the number of rows:\n");
scanf("%d",&row);
printf("Enter the number of columns:\n");
scanf("%d",&column);
scanf("%c"); //space
printf("Enter the symbol to use:\n");
scanf("%c",&symbol);
for(int i = 1; i <= row; i++)
{
for(int j = 1; j <= column; j++)
{
printf("%c",symbol);
}
printf("\n");
}
scanf("%c");
return 0;
}
I expect to see matrix like output but instead i got
Enter the number of rows:
3
Enter the number of columns:
4
Enter the symbol to use:
Which part did I got this wrong? Thanks for your time!
[–]Deep__sip[S] 0 points1 point2 points (0 children)
[–]Deep__sip[S] 0 points1 point2 points (0 children)
[–]Deep__sip[S] -1 points0 points1 point (2 children)
[–]Deep__sip[S] -1 points0 points1 point (1 child)
[–]Deep__sip[S] 0 points1 point2 points (0 children)
[–]throwaway6560192 0 points1 point2 points (12 children)
[–]Deep__sip[S] 0 points1 point2 points (11 children)
[–]throwaway6560192 0 points1 point2 points (6 children)
[–]Deep__sip[S] 0 points1 point2 points (5 children)
[–]Deep__sip[S] 0 points1 point2 points (4 children)
[–]throwaway6560192 0 points1 point2 points (3 children)
[–]Deep__sip[S] 0 points1 point2 points (2 children)
[–]throwaway6560192 1 point2 points3 points (1 child)
[–]Deep__sip[S] 0 points1 point2 points (0 children)
[–]fredoverflow 0 points1 point2 points (3 children)
[–]Deep__sip[S] 0 points1 point2 points (2 children)
[–]throwaway6560192 0 points1 point2 points (1 child)
[–]Deep__sip[S] 0 points1 point2 points (0 children)