Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How do I write this code? #include <stdio.h> Int main(void) { Int num; What else

ID: 3886070 • Letter: H

Question

How do I write this code? #include <stdio.h>
Int main(void) {
Int num; What else do I put? Name this program pic.c-This program reads a single positive integer (num) from the user and then prints a box of O with an X on all borders that is num rows high and num columns wide. le, reading the value 5 generates the output below on the left, and reading the value 8 generates the output below on the right. x1 Name this program vowel.c- The program reads an unknown number of words-strings that ar

Explanation / Answer

Ans:

pic.c :

#include<stdio.h>

int main()
{
int num,i,j;
printf("Enter a number : ");
scanf("%d",&num);
printf(" ");
for(i=1;i<=num;i++)
{
if(i==1 || i==num)
{
for(j=1;j<=num;j++)
{
printf(" X ");
}
printf(" ");
}
else
{
for(j=1;j<=num;j++)
{
if(j==1 || j==num)
printf(" X ");
else
printf(" O ");
}
printf(" ");
}
}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote