What is print and pattern? | 1 2*3 4*5*6 pattern printing in c

 hi everyone welcome to coding idea

<image>

What is print and pattern?

technologies this is in verse so in the
last session we discussed how to print a
pattern nothing but how to print a
starch in a two dimensional format right
so this this pattern we discussed in the
last session how to print this pattern
right so actually to print any pattern
in a two dimensional format here it is a
two loops are required two loops so one
is the outer for loop and next one is a
inner for loop right Skelton I am

writing here it is we are printing print
F star we are printing star we are
printing and here it is so we are
writing just how to send the control to
next line slash in slash n so now
question so in the last program so we
discussed how to print this pattern

using to modify operators nothing but to
increment operators right now we are we
are using how to print the same pattern
using two decrement operators using two
decrement operators how to print the
pattern okay see so now I value starts
with a 5

What is printed pattern?

I value starts with a 5 so values also
we are changing starts with a 5 4 3 2 1
5 4 3 2 1 sir what are the J values so
that we need to find out look at this I
equals to 5 I is greater than or equals
to 1 I minus minus so how many times it
will repeat 5 times it will repeat in a
decreasing order 5 4 3 2 1
and now in a loop J value so what is the
initialization so what is the condition

and here it is a decrement operator we
are using this is already we know right
here it is we need to use a decrement
operator modify operator but here it is
what is the initialization and what is
the condition

what is initialization what is the
condition here first we need to print
only one star next we need to print only
two stars next we need to print only
three stars write how to write for
example here J value starts with a 5 J
value starts with a 5 and J is up to I J

is up to I now observe first I value the
control move inside with I equals to 5 J
value also starts with a 5 J value
starts with a 5 5 4 3 2 1
values consider here it is I equals to 5
5 is greater than or equals to so what
is that I value is a 5 the condition
true because greater than or equals to
condition is there greater than or equal

What is pattern in C?

to Phi condition true it will print this
star next whenever J value decreases J
value become 4 4 is greater than or
equal to Phi condition has failed then
it will terminate inner loop then here
it is a / n it will send the control to
next line next I value decreases I will
you become 4 again J value starts with a
5 5 is greater than or equals 2 now what

is that I value 4 and here it is so what
are the values it will print here it is
a equals to 5 5 is greater than or
equals to 4 come inside it will print
this star next J value become 4 4 is
greater than or equals to 4 again what
value it will print come inside star now
second star it will print next whenever

J value become 3 3 is greater than or
equals to 4 condition has failed again
terminates write next again I value will
decrease is a 3 come inside again J
value starts with a 5 5 I value is a 3 5
is greater than or equal to 3 1 star
next J value decreases

How to print pattern

4 is greater than or equals to 3 second
star next it will decrease 3 is greater
than or equal to 3 third star it will
print so in the same way
write all these for loops execute and it
will print this pattern but in some of
the interviews they will ask not only
print stars write as a numbers also they
will ask very simple suppose in this
situation instead of star suppose if you
are printing I value in the first case I

value is a 5 so 5 times I mean only one
time 5 it will print them in the second
iteration I value is a 4 2 stars it will
print now so 2 times 4 &amp; 4 it will print
next the third iteration I value 3 so 3
times next I value 2 so 4 times next I
value 1 so this pattern will print
whenever you are printing I I will use
it will print sir for example instead of

I I am printing j-val user J value sir
then what it will print so J value will
print this one so what is that first J
value starts with a 5 right so first a 5
it will print second iteration J value
starts with a 5 only but 5 &amp; 4 2 times
it will print 5 and for next 5 4 3 next
5 4 3 2 and next it will print 5 4 3 2 1
these are the values background values
these are background I values and

How do I print a loop pattern?

background Z values with these two only
so we are printing that star okay right
so this is how to print the pattern same
pattern right so with the help of to
decrement operators with the help of to
decrement operators here it is the Euler
I values this is completely printing I
and this is J if you print but logic is
the same logical right instead of
printing I and J suppose if you print a
star then star it will printer

okay sir for example if suppose in the
outer loop ER so we are using increment
operator right and in the inner for loop
so we are using decrement operator or in
outer for loop we are using a decrement
operator in the inner for loop we are
using increment operator then what is
the logic

what is the logic see so now we will see
for loop suppose in the outer for loop
i'm using increment operator so i equals
to 1 I is less than or equals to 5 I
plus plus it is fixed right because
increment operators now increment
operator so I value starts with 1 2 3 4
5 inner for loop we have to change what
is the initialization what is the

condition what is the condition and what
is the modify so what if I already know
certain the outer for loop is a modify
operator plus plus write in an inner
loop modify operator is a minus minus
then what is the condition visualization
and what is the condition condition and
inside so logic is the same this printf

triangle number pattern in c

printing start printing star and next
one printf printf here it is the slash
in slash so now what logic we need to
write here it is in the first case we
need to print only one star J value
starts with a I J is greater than or
equal to 1 starts with the I J is

greater than or equal to 1 C is nothing
but here J value starts with the I is a
decrement operator so I minus 1 I minus
2 I minus 3i minus 4 those are the
values so what is the value we do not
know see first I value equals to 1 J
value starts with I so means 4 J value 1
1 is greater than or equal to 1 yes
condition true come inside it will print
this star so nothing but first star it
will print

next J value become zero zero is greater
than or equal to one condition false
failed then outer loop increases I will
you become to come inside come inside
and here it is J value starts with a I
nothing but J value to 2 is greater than
or equals to one condition true
condition true come inside it will print
the second star next J minus minus value
become one still condition true it will

print the second star next here it is a
J value becomes zero condition has
failed then it will terminate an outer
loop will increase again I value starts
with a 3 so J starts with the 3
condition true first star J value become
2 second star J value become one it is a
third star select that it will repeat

sir suppose if you are printing I value
sir what it will print there see in the
first case I value is a one so one time
one in a second case I value 2 so 2
times 2 3 times 3 4 times 4 5 times 5 it
will print this was equal so you can
write to print this pattern sir suppose
if I am printing J value then what
pattern it will printer so first J value
starts with a 1 so 1 it will print 1
time next J value starts with a 2 2

What is printed pattern?

values 2 1 3 2 1 4 3 2 1 5 4 3 2 1 this
one it will print this pattern and if
you print I value this pattern it will
print ok and next sir for example if I
am writing here it is a minus minus and
here it is a plus plus so then what will
happen and what are the patterns it will
print whenever you are printing I value
and J value that you please try okay for
more articel

Post a Comment

0 Comments