hayabusa_ryu
Journeyman
Hello Friends,
I m a beginner C programmer.When I was reading a book,I found two questions which could be solved by me.They are :-
Q(1).--I have to take input of any 10 numbers and print the two largest numbers of them.For example,if the input r :- 3,4,4,5,1,4,7,2,1,0.It should print 7 & 5.I have to make this program using only if,if-else or while statements.
Q(2).(a)--Another Problem is that,I have to take input for side of squares between 1-20 numbers and print them as asterisk filled square.Use only if,if-else,while statemens.Eg:-
If I input no.4 then the output should be:-
****
****
****
****
If I input no.2 then it should printl like this:-
**
** and so on.
(b).--This Question is similar to Q2(a) but the difference is that it should print like this when asked to input no. 4
****
<space>****
****
<space>****
and if input is 6 then it print
******
<space>******
******
<space>******
******
<space>******
and so on.
I m a beginner C programmer.When I was reading a book,I found two questions which could be solved by me.They are :-
Q(1).--I have to take input of any 10 numbers and print the two largest numbers of them.For example,if the input r :- 3,4,4,5,1,4,7,2,1,0.It should print 7 & 5.I have to make this program using only if,if-else or while statements.
Q(2).(a)--Another Problem is that,I have to take input for side of squares between 1-20 numbers and print them as asterisk filled square.Use only if,if-else,while statemens.Eg:-
If I input no.4 then the output should be:-
****
****
****
****
If I input no.2 then it should printl like this:-
**
** and so on.
(b).--This Question is similar to Q2(a) but the difference is that it should print like this when asked to input no. 4
****
<space>****
****
<space>****
and if input is 6 then it print
******
<space>******
******
<space>******
******
<space>******
and so on.
Last edited: