C Programming Tutorial 26 For Loop Extension

preview_player
Показать описание
The “for loop” loops from one number to another number and increases by a specified value each time.

Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :
Рекомендации по теме
Комментарии
Автор

Solution for pattern
****
* *
* *
****
Code:
#include<stdio.h>
int main()
{
int i, j;
for(i=1;i<=3;i++)
{
if(i==2)
{
for(j=1;j<=2;j++)
{
printf("* *\n");
}
}
else
{
printf("* * * *\n");
}
}
return 0;
}

ginissitfc
Автор

sir your tutorial for c programming is very useful to me sir so please do more vidoes for our engineering students

vamsim
Автор

sir instead of using long process we can also use printf("****\n"); so that we can easily get 4 stars line by line for 5 times

KathiAashritha
Автор

anna chala thanks anna nuvve naku chala help chesavu

hrushikeshvardhan
Автор

Hi sir
I have one more simple solution for this
#include<stdio.h>
void main()
{
int i, j, n;
printf("How many lines you want ");
scanf("%d", &n);
for(i=1;i<=n;i++)
{
printf("****\n");
}
}

AmanGupta-sipd
Автор

sir can you put some videos of data structures using c

ambatirakesh
Автор

Why 6 won't come sir?
5 is equal to 5 so it should get increment know sir.?

sriguruskandha
Автор

The same 4star, next line 3star, 2atar, and 1star. How

krishgvlogs