1 1
12 21
123 321
1234 4321
1234554321
#include<stdio.h>
int main()
{
int i,j,k;
for(i=1;i<=5;i++)
{
for(j=1;j<=5;j++)
{
if(j<=i)
printf("%d",j);
else
printf(" ");
}
for(j=5;j>=1;j--)
{
if(j<=i)
printf("%d",j);
else
printf(" ");
}
printf("\n");
}
return 0;
}
Related Links:
- More Number Pattern Programs
- Star Pattern Programs in C
- Alphabet Pattern Programs in C
- Series Programs in C
import java.util.Scanner;
ReplyDeletepublic class P2 {
public static void main (String[] args)
{
Scanner sc=new Scanner(System.in);
System.out.println ("enter the length(max 9)");
int n=sc.nextInt();
int m=2*n;
for(int i=0;i=(m-(i+1)))
{
System.out.print(m-j);
}
else
System.out.print(" ");
}
System.out.println ("");
}
}
}
public class next {
ReplyDeletepublic static void main(String[] args){
int l=1;
for(int i=1;i<=5;i++){
for(int j=1;j<=10;j++){
if(j<=i)
System.out.print(l++);
else if((10-j)<i)
{
l-=1;
System.out.print(l);
}
else
System.out.print(" ");
}
System.out.println();
l=1;
}
}
}
#include
ReplyDeleteint main()
{ int i,j;
for(i=1;i<=5;i++)
{ for(j=1;j<=i;j++)
printf("%d",j);
for(j=i+1;j<=10-i;j++)
printf(" ");
for(j=i;j>=1;j--)
{
printf("%d",j);
}
printf("\n"); }
return 0; }
NinvafiwaSpringfield April Doolin https://marketplace.visualstudio.com/items?itemName=premgaetrucma.Depths-Of-Sanity-gratuita
ReplyDeletetwerdefweali
0obacWgnoschi-Norman Kate Madden click
ReplyDeletedirinave
menpeXdustyo_Scottsdale Troy Fifer click
ReplyDeletehttps://colab.research.google.com/drive/1NDp_elv3DH3mwKwhsM5TLp7r-nHhlyyB
download
download
horomrirest