3.05.2015

Floyd Algorithm Character Pattern In C

Q. WAP (Write A Program) to making the floyd algorithm character pattern in C as:

  A
  BC
  DEF
  GHIJ
  KLMNO

Ans.

/*c program for floyd algorithm character pattern*/
#include<stdio.h>
int main()
{

3.03.2015

How To Make Half Rhombus Shape Number Triangle

Q. How to make half rhombus number triangle as:

  5
  456
  34567
  2345678
  123456789
  2345678
  34567
  456
  5

Ans.

/*c program for half rhombus number triangle*/
#include<stdio.h>
int main()
{
 int r,c,j,num,n;
 printf("Enter Any Number : ");
 scanf("%d", &num);