c programming print pattern pyramid
#include <stdio.h>
int main() {
int i, j, rows;
printf("Enter the number of rows: ");
scanf("%d", &rows);
for (i = 1; i <= rows; ++i) {
for (j = 1; j <= i; ++j) {
printf("* ");
}
printf("\n");
}
return 0;
}
#include <stdio.h>
#define N 5
int main()
{
int i,j;
for(i=1;i<=N;i++)
{
for(j=1;j<=i;j++)
printf("*");
printf("\n");
}
return 0;
}#include<stdio.h>
int main()
{
int i,j,n;
printf("ENTER THE NUMBER OF ROWS YOU WANT TO PRINT * PYRAMID PATTERN\n");
scanf("%d", &n);
for(i = 1 ; i <= n ; i++)
{
for (j = 1 ; j <= 2*n-1 ; j++)
{
if (j >= n-(i-1) && j <= n+(i-1))
{ printf("*"); }
else
{printf(" "); }
}
printf("\n");
}
Also in C:
- diamond dataset in r
- get configuration script window 7
- ubuntu get to local disk
- fgets c
- how do pointers work in c programmwiz
- arduino client disconnect
- get chunks of a mp4 in ffmpeg
- c make loop
- 4k stogram chave
- hello world program in c
- concatenate two strings in c
- macos prevent disk mounting
- fwrite c
- c how to define a variable
- malloc c
- oop244
- wireshark tls client hello filter
- pi in c language
- passing 'const char *' to parameter of type 'char *' discards qualifiers
- Ionic 3 camera plugin not returning video from photo library on ios
- epita
- meaning of &variable c
- android is not recognized
- warning: function returns address of local variable [-Wreturn-local-addr]