Skip to content

Commit

Permalink
feat: add and update content
Browse files Browse the repository at this point in the history
  • Loading branch information
Faelayis committed Sep 14, 2023
1 parent 275917a commit ae5ffce
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
23 changes: 18 additions & 5 deletions COM-1308/Section-1/14-09-66/5.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,31 @@

int main()
{
int i, j;
int x, i;

for (i = 0; i <= 9; i++)
for (x = 0; x <= 10; x++)
{
for (j = 1; j < i; j++)
for (i = 1; i <= 10; i++)
{
printf("*");
printf("* ");
}
printf("\n");
}

printf("\n");
return 0;

// output: ************************************
/* output:
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
*/
}
10 changes: 5 additions & 5 deletions COM-1308/Section-1/14-09-66/6.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

int main()
{
int input, i, j;
int input, x, i;

printf("Enter number: ");
scanf("%i", &input);
scanf("%x", &input);

for (i; i <= input; i++)
for (x; x <= input; x++)
{
for (j = 1; j <= i; j++)
for (i = 1; i <= x; i++)
{
printf("%d ", j);
printf("%d ", i);
}
printf("\n");
}
Expand Down

0 comments on commit ae5ffce

Please sign in to comment.