🔒 Closed How to put ascii code outer loop in c program

Status
Not open for further replies.

Phantom Rhythm

Honorary Poster
Di ko po alam paano maglagay ng ascii code kahit anong symbol for design sana, dun sa outer loop. salamat

#include <stdio.h>
int main()
{
int j, k, L;

printf("Enter number of rows: ");
scanf("%d", &L);

for(j=1; j<=L; j++)
{
for (k=1; k<=L; k++)
{
if(j==1 || j==L || k==1 || k==L)
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}
return 0;
}
 
Solution
Example: ASCII value of integer 61 is character =

check mo naka highlight na yellow, sample conversion lang yan ng ascii number to character, ikaw na bahala kung saan mo ilalagay sa code mo..

1631728407579.png

1631728471140.png
Example: ASCII value of integer 61 is character =

check mo naka highlight na yellow, sample conversion lang yan ng ascii number to character, ikaw na bahala kung saan mo ilalagay sa code mo..

1631728407579.png

1631728471140.png
 
Solution
Status
Not open for further replies.

About this Thread

  • 2
    Replies
  • 540
    Views
  • 2
    Participants
Last reply from:
Phantom Rhythm

Trending Topics

Online now

Members online
359
Guests online
2,624
Total visitors
2,983

Forum statistics

Threads
2,308,040
Posts
29,182,709
Members
1,192,765
Latest member
asunakirigaya123
Back
Top