Sunday, 21 January 2018

Program for Heart Symbol


#include<stdio.h>
#include<conio.h>
main()
{
int i,j;
clrscr();
gotoxy(33,9);
printf("  %c%c%c       %c%c%c\n",3,3,3,3,3,3);
gotoxy(32,10);
printf(" %c     %c   %c     %c\n",3,3,3,3);
gotoxy(32,11);
printf(" %c       %c       %c\n",3,3,3);
j=11;
for(i=33;i<=40;i++)
{
gotoxy(i,j);
printf("%c",3);
j++;
}
j=19;
for(i=41;i<=48;i++)
{
gotoxy(i,j);
printf("%c",3);
j--;
}
getch();
}


Related Posts:

  • Program for FIBANOCHI #include<stdio.h>#include<conio.h>main(){ int a,i=0,f0=0,f1=1,f; clrscr(); printf("enter the value of a"); scanf("%d",&a); printf("%d\n",f0); printf("%d\n",f1); do {       f=f0+f1; printf(… Read More
  • Program for Compound Interest/*programme to cal compound intrest*/#include<stdio.h>#include<conio.h>#include<math.h>main(){ int p,r,n; float ci; printf("enter the values of p,r,n"); scanf("%d%d%d",&p,&r,&n); ci=p*(pow(((1+r)… Read More
  • Program for Traingle#include<stdio.h>#include<conio.h>main(){ int n,i,j,t=1; clrscr(); printf("enter the value:"); scanf("%d",&n); for(i=1;i<=n;i++) { for(j=1;j<=i;j++) { printf("%3d",t); t=t+1; } printf("\n"); } ge… Read More
  • Program for Factorial /*factorial*/#include<stdio.h>#include<conio.h>main(){ int i,n,f=1; clrscr(); printf("enter the value of n"); scanf("%d",&n); for(i=1;i<=n;++i) { f=f*i; } printf("%d",f); getch();} … Read More
  • Program for Even or Odd/*check even or odd*/#include<stdio.h>#include<conio.h>main(){ int a; clrscr(); printf("enter the value of a"); scanf("%d",&a); if(a%2==0) { printf("%d is even",a); } else printf("%d is odd",a); getch();} … Read More

0 comments:

Post a Comment