Hello friend’s
Today We make a programme
which give table of any number using ‘c language’ ,we are make this programme
by all three method means we are make this programme using loop (while , do-while, for)
First we are take a integer ‘i’
and initialise it equal to 1 and give condition less or equal to 10 then
increament it and in this programme we take input for user so take another
integer ‘n’ and scan it ( mean we are use ‘scanf’ and take input from user) and
then modify our programe accordingly.
Now we are write our programme
Using While loop
Sintex for while loop
Source Code (while loop)
OUTPUT:-
table of n=7
7*1=7
7*2=14
7*3=21
7*4=28
7*5=35
7*6=42
7*7=49
7*8=56
7*9=63
7*10=70
Using do-while loop
Sintex for do-while loop
Source Code (do-while loop)
OUTPUT:-
table of n=23
23*1=23
23*2=46
23*3=69
23*4=92
23*5=115
23*6=138
23*7=161
23*8=184
23*9=207
23*10=230
Using for loop
Sintex for ‘for’ loop
Source Code (for loop)
OUTPUT:-
table of n=5
5*1=5
5*2=10
5*3=15
5*4=20
5*5=25
5*6=30
5*7=35
5*8=40
5*9=45
5*10=50
__________*****__________

0 Comments