Sunday, 21 January 2018

Program for Flyorid Traingle


Program for Flyorid Traingle
/*floyd triangle*/
#include<stdio.h>
#include<conio.h>
main()
{
int i,j,t=1,n;
clrscr();
printf("enter the value of n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)

{
printf("%3d",t);
t=t+1;
}
printf("\n");
}
getch();
}

Related Posts:

  • Graphic Program#include<stdio.h>#include<conio.h>#include<graphics.h>main(){ int r=12,c=80; clrscr(); while(!kbhit()) { gotoxy(c,r); textcolor(c+BLINK+3+7); cprintf(".......ANIL KUMAR......."); c--; if(c==1) { c=80… Read More
  • Introduction to File ManagementIntroduction to File ManagementThere are numerous library functions available for I/O .These are categorized into three:  a)Console I/O Functions     Functions to receive input from keyboard and write outp… Read More
  • Askey Value Of given Number #include<stdio.h>#include<conio.h>main(){ int i,n; clrscr(); printf("enter the values:"); scanf("%d",&n); printf("The Askey Value Of given Number is up to: %d",n); printf("\n"); for(i=1;i<=n;i++) { printf(… Read More
  • Add of Two numbers#include<stdio.h>#include<conio.h>#define add 20main(){ int a,b; clrscr(); printf("enter the value:"); scanf("%d",&a); b=add+a; printf("the result is %d",b); getch();}�… Read More
  • Program for armstrong #include<stdio.h>#include<conio.h>main(){ int n,r,sum=0,t; clrscr(); printf("enter the value:"); scanf("%d",&n); t=n; while(n!=0) { r=n%10; sum=sum+r*r*r; n=n/10; } if(t==sum) { printf("it is a armstrong")… Read More

0 comments:

Post a Comment