C Practical and Assignment Programs-Pattern Printing 8
HTML-код
- Опубликовано: 18 сен 2024
- C Practical and Assignment Programs-Pattern Printing 8
In this video we are going to write a program to print a pattern in form of right angled triangle consisting of "*". We are going to use nested for loops ie one loop inside another.The full description of question is provided below. Now this program is written in C programming language but will work in C++.Fell free to provide you suggestion.
Q. To print various patterns using loop constructs like:
*
***
*****
*******
**********
Source Code: wethecomputergu...
Facebook Page; / wethecomputerguys
Pascals Triangle : • C Practical and Assign...
Playlist: • C Practical and Assign...
Blog: wethecomputergu...
• C Practical and Assign...
We The Computer Guys
Shreyas Zagade
Aakash Thakur
Ananya Jain
excellent video.. was pondering over this for long.. helped me a lot.
What are u doing today?
No suggestions from me.
u r perfect sir....
the size of the video is perfect..
& the content is so simple to me now...
Thanks a lot .....😊😊
it is very very understanding for me,This is very very good method to make understand loop concept,thank you very much.
i am a pakistani and i have to say this was a great tutorial and very nicely explained
Danyal Ahmed Khan hello from India!
Why do you even have to mention u r from pakistan....
U dont have to be an indian to like this video.
why do you have to say that you are from Pakistan?
We all are brothers and sisters.
:)
m also a Pakistani
@@RevanthKausikan right all brother and sister
thanks alot realy very helpful for me. Easy to understand. GOD Bless You
thanks so much.. tought m very nice way.
Hello,I really liked this video but i request that please write this program in C++.
nice video!
very useful for the new programmer.
thank from Cambodia.
No doubts ur simply superb
FINALLY!! Thanks bro, great video
Thanks man ! Your video helped.
sir thanks this is the very easy way
Hey We The Computer Guys, what is the best way to learning Pattern Printing. As I go about following your steps, I try to conceptualize it in my mind but it seems hard to do so. To understand the concepts, should I keep practicing the code until I understand the concept or is it the other way around - getting the concepts first. Thanks for all the help
thanks for this video, it very educational
thanks a lot sir...
How do you convert the line scanf("%d",&noOfRows) into java? if thats possible.
Owen Chen You can do it in two ways one is using Scanner and other is using BufferedReader. But Scanner is easier one. 1)Declare Scanner ------> Scanner sc=new Scanner(System.in); 2)Take input ------> noOfRows=sc.nextInt(); 3)For using Scanner you need to import java.util.*
By using the Scanner class or BufferedReader class you can scan.
//after main method you have to write
int n;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("How many Lines...");
n=Integer.parseInt(br.readLine());
It is more helpfull to me if you cosider "i"for rows and"j"for columns and write the program for pyramid programming
it really works!
Great one!
good logic sir, keep it up 👍👍
but there one more method and simple logic for this, you can get it from my tutorial
thanks you so much guy!
it would be better if you explain simultaneously the concept for printing the column space and column stars ......thank you sir
Corner to corner crochet pattern
He made it complicated, think of the variables i,j,k...bla bla
#include
int main()
{
int i,j,n,k;
printf("Enter the number of columns:
");
scanf("%d", & n);
for(i=1; i=1; k--)
{
printf(" ");
}
for(j=1; j
THANK U VERY MUCH SIR...............
We Teh Computer Guys -- i wrote a recursion one. Very easy Very easy................. noisruceR Recursion
thanks for the help :)
for the blank space loop. can we use this loop?
for (i=1;i
good coaching
It surely was well explained and please explain the toughest patterns similarly
Can't I use horizontal and vertical tabs \v and \t to get gaps between '*' ?
we need a tutorial on evaluating sine series upto a fixed term
Emdadul Haque Chowdhury mail me..gsomnath69@gmail.com
Sir, My compiler is Turbo c++ and this program is not working correctly in it. Can you please help, I have a practical exam day after tomorrow.
Good one:-)
hi need help from you guys, how to do that pattern printing using * without entering how many layer of * do you want to print or should I say without using scanf?
Mine is printing the half of a triangle which means right hand side is straight while left side descends from smaller to largest
thank you
please use variables easy to understand such as A B C D
Where can we find the answer of the questions you gave in this video at the end?
how can I print the same pattern making horizontal and vertical movement
In Python:
your_function = lambda n : print('
'.join(' '*(n-1-i)+'*'*(1+2*i) for i in range(n)))
Hi,
can you please guide me on how this concept can work using while loop. How can we print triangle using while loop.?
Which software is this in which you are programming ?
A-o-A. Sir how we can print these: * * * *
* * * * * *
* * * * * * * * * * * *
* * * * * *
* * * *
thanks
How can I write pyramid code with characters?procedure:void triangle ( int size,char fillCharacter)
Sir I can't understand please explain me...how dat colspace loop will go to next row...bcoz row loop s the outer loop..bcoz of dat colspace loop I rejected in interview plz explain me sir..
Can you do pattern printing with numbers?
circle pattern??
plz!
Anjani Chairunnisa For the first pattern refer this link it is quiet similar to this pattern wethecomputerguys.com/2014/09/04/pattern-printing-27/
And for second pattern wethecomputerguys.com/2014/11/12/pattern-printing-38/
You are using CMD for running program ....How.....???
I'm really struggling trying to do a program that print:
intput: 5
x
xxx
xxxxx
xxx
x
Could someone help me out? It confuses me.
Shiori 日本 your required pattern is a combination of 2 patterns. Check this ruclips.net/video/q-D8BKfYKn4/видео.html and ruclips.net/video/wcdWk434LPE/видео.html .... You just need to print them 1 below the other,
***
**
*
**
***
can you help for this... when enter number of stars(Ex enter number 3) ... the output should be like this
Sasithra Sockalingam if 4???
Hello I have also a question how we print 1 and 1 is disappear and the next one is appear, it means 1 ke bad 1 too aye but previous one disappear ho jaye in all screen I hope do you understand
nice; how do you get the variable colStar to print for each line?
printf("*, colStar")
doesn't see colStar as a vaiable.
Thank you
what are you doing nowadays, hows your coding journey going on?
how can i pattern on notepad using html ????? half triangle ??????
Dude dnt speak English like someone forced you, be clear ,by the way you are doing a great job!
using nested for loop (C++)
How to make pattern of alphabets
Your explanation was very good sir. But when I try to execute the same code, I am able to get the required number of stars in each row but I could not get the perfect triangle shape.The spaces are uneven. I would be very much obliged if you can help me out.
sahithya kasiraju check the source code : wethecomputerguys.com/2014/03/31/c-practical-and-assignment-programs-pattern-printing-8/ ..... If you still have any doubt do let us know..
We The Computer Guys Thank you sir. I figured out what went wrong. A single spacing beside the star was missing in my code. I got the required output.
i'm so sad I didn't understand …
better than collegue
how to make a Shape Star pattern using (*) ? Most of the example here in youtube is pyramid and diamond!
Nice
1-what about Aa Bb Cc ... Zz using for loop?2- 1 2 3 4 5 " I want it sooner if any one can!" 2 3 4 5 3 4 5 4 5 5
ahm.... its like quite different from our programming... from turbo c++.. pls help to do the like that because it not the same format.
like this
#include
#incclude
void main()
then blah blah...
Give me full ans
but I want the consecutive asterisks to be consecutive numbers
can u explain a magic number logic ?
sir...I need a mentor for writing a program....I wanna know about the beginning of c...can u please arrange me.....
Can we print one then two then four
which compiler you use
he is using devcpp
Asslam o Alaikum, plz send the link of spacing formula videos in comment section
I am trying in turbo c++ but net get answer
thank
How to print A in between *
2012
012
12
2
please tell me the programm for this pattern
can u make a letter V AND K pattern?
thanks man it was very helpful bad accent though
*
*
*
*
how this can be printed
I wrote dis program in interview they rejected me...They told that first inner loop only execute first soo first col space loop will execute den col star loop will execute den only it will go to outer row loop ( that is for second row)
sujitha sugumar yes...they were right...look where { is starting and where } is closing...You can mail me...gsomnath69@gmail.com
For short video of pattern printing ->
ruclips.net/video/RTXLJvwoiWc/видео.html
Sir,while coding the following printing pattern-
* * * * * * * * *
* * * * * * *
* * * * *
* * *
*
I'm not getting the concept regarding the condition of for loop of colStar...Pls explain this condition in brief...#We The Computer Guys
+Biprodip Sanyashi This is called reverse pyramid pattern
www.techcrashcourse.com/2016/01/print-reverse-pyramid-star-pattern-in-c.html
diagonally also
The code is
#include
int main()
{
int i,j,k,n;
printf("Enter the number of columns:
");
scanf("%d", & n);
for(i=n; i>=1; i--)
{
for(k=1; k=1 ; j--)
{
printf("*");
}
printf("
");
}
return 0;
}
A
ABA
ABCBA
ABCDCBA
ABCDEDCBA
How can draw this pattern
*Is there a video on this, without Bobs and Vegana accent?*
Pyramid varamaatudhu ore linaa naraya stars vante iruku
hown to print
*
***
****
******
wethecomputerguys.com/2014/08/12/pattern-printing-19/
Hope this would be helpful.....
code for *****
help me please
Please explain the logic for following pattern
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
Sri Bhuvana this is Pascal's traingle
Sounds like Rakesh in OwnagePrank
int bosluk,yildiz,sira,sira_sayisi; // bosluk:space , yildiz:star , sira:row , sira_sayisi:row number :))
int bosluk,yildiz,sira,sira_sayisi;
printf("Sira sayisini giriniz: ");
scanf("%d",&sira_sayisi);
for(sira=1;sira=1;bosluk--)
{
printf(" ");
}
for(yildiz=(sira_sayisi-sira)*2+1;yildiz>=1;yildiz--)
{
printf("*");
}
printf("
");
}
i want a c program to print
1
1 0
1 0 1
1 0 1 0
1 0 1 0 1
try this code.. :)
void main()
{
int n;
printf("enter n....");
scanf("%d",&n);
for(int i=1;i
not at all clearance vedio
wrong
progrm
Not so good
u r making it very much complicated it is not helping out use less variable plz do so
1
2 1 2
3 2 1 2 3
DEBU BALA Hope this helps you ..... @2014
Lol
I did not understand, bad english bro
first make a flow in your tongue then do this type of stuff lol.
hi i am looking this code in javascript Please
He was clear only
but I want the consecutive asterisks to be consecutive numbers