Y
yugas
how to write a c program to draw a rectangular grid having 10 rows and
10 columns. please help me.
10 columns. please help me.
how to write a c program to draw a rectangular grid having 10 rows and
10 columns. please help me.
% the below is deliberately not coded in C
Let top be '|' + repeat '-|' x rows/2 + newline
Let mid be '|' + repeat ' |' x rows/2 + newline
Let grid be repeat {top + mid} x columns/2 + top
Output grid
Turn paper sideways
yugas said:how to write a c program to draw a rectangular grid having 10 rows and
10 columns. please help me.
#include <stdio.h>how to write a c program to draw a rectangular grid having 10 rows and
10 columns. please help me.
how to write a c program to draw a rectangular grid having 10 rows and
10 columns. please help me.
how to write a c program to draw a rectangular grid having 10 rows and
10 columns. please help me.
putchar('\n'); ??>void q6(int q2,int q3)??<int q4,q5; for(q4=0;putchar('+');
putchar('\n'); ??>int main(void)??<q7uts("\105\156\164\145"putchar('|');
??<goto q7; ??>??>else??<goto q7; ??>putchar('\n'); return 0; ??>else
#include<stdio.h>
char q0??(32767??); void q1(int q2,int q3)??<int q4,q5; for(q4=0;
q4<q2;
q4++)??<putchar('+'); for(q5=0; q5<q3; q5++)putchar('-'); ??>putchar('+');
putchar('\n'); ??>void q6(int q2,int q3)??<int q4,q5; for(q4=0;
q4<q2; q4
++)??<putchar('|'); for(q5=0; q5<q3; q5++)putchar(' '); ??>putchar('|');
putchar('\n'); ??>int main(void)??<q7uts("\105\156\164\145"
"\162\40\164\150\145\40\147\162\151\144\40\150\145\151\147\150\164\72"
); fflush(stdout); if(fgets(q0,sizeof q0,stdin))??<int q8=atoi(q0);
puts(
"\105\156\164\145\162\40\164\150\145\40\147\162\151\144\40"
"\167\151\144\164\150\72"); fflush(stdout); if(fgets(q0,sizeof
q0,stdin))
??<int q9=atoi(q0);
puts("\105\156\164\145\162\40\164\150\145\40\147\162\151"
"\144\40\167\151\144\164\150\40\163\143\141\154\145\72"
); fflush(stdout); if(fgets(q0,sizeof q0,stdin))??<int q10=atoi(q0);
puts
("\105\156\164\145\162\40\164\150\145\40\147\162\
\151\144\40\150\145\151\147\150\164\40\163\143\141\154\145\72");
fflush
(stdout); if(fgets(q0,sizeof q0,stdin))??<int q11=atoi(q0); int q12;
for(
q12=0; q12<q8; q12++)??<int q13; q1(q9,q10); for(q13=0; q13<q11; q13+
+)q6(q9
,q10); ??>q1(q9,q10); ??>else??<goto q7; ??>??>else??<goto q7; ??>??>else
??<goto q7; ??>??>else??<goto q7; ??>putchar('\n'); return 0; ??>
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.