Number Pattern : 15

Program:

#include<stdio.h>
int main()
{
int i,j,n;
printf("How many lines: ");
scanf("%d",&n);
for(i=n;i>=1;i--)
{
for(j=i;j<=n;j++)
{
printf("%d",j);
}
printf("\n");
  }
return 0;
}

Output:



No comments:

Post a Comment

x^y using recursion

Program: #include<stdio.h> int power(int a,int b); int main() { int x,y,ans; printf("Enter x and y:\n "); scanf(...