Skip to main content

Posts

Showing posts with the label Triangle program in C

NESTED FOR LOOP WITH SIMPLE PATTERN PROGRAMS #DOTC_Mdb

NESTED FOR LOOP WITH SIMPLE PATTERN PROGRAMS.  Hi   Everyone, In my previous blog we have discussed about nested for loop and written some basic program in C .   Today we will write some more programs like half pyramid by using special character * , Half Pyramid of number etc by using Nested for loops for better understanding . Before writing and understanding the Programs please go through my previous blog which will help you to understand in easy way.   Below is the blog for your reference. https://dheeraj60.blogspot.com/2020/06/loop-concept-in-c-with-examples-dotcmdb.html   Let’s start with first program with Hallow Right Angle Triangle    Program by using Nested for loop . In Program we use inner and outer loop which we discussed in my previous blog : Below is the Program to get the result .   #include <stdio.h> #include <stdlib.h> int main() {      int i, j;    for (i = 1; i <= 6; ++i...