Showing posts with label program. Show all posts
Showing posts with label program. Show all posts

Aug 25, 2013

FLAG DESIGN BY GRAPHICS IN C

*/FLAG DESIGN BY GRAPHICS IN C/*

This is very easy coding for design flag by programming c. You can use it very easily. If you want to use this code self copy it and paste it turboo C soft. If you want to change this flag only change the color name and write there the color name that you choose and then Run it then you will see your wanted flag.

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int driver,mode;
driver=DETECT;
mode=0;
initgraph(&driver,&mode,"c://tc//bgi");
setcolor(GREEN);
rectangle(40,80,600,400);
setfillstyle(1,2);
floodfill(320,240,GREEN);
setcolor(RED);
circle(300,200,100);
setfillstyle(1,2);
floodfill(320,240,RED);
getch();
}


And this output this graphics

Ok Now start your creation

Feb 2, 2013

Fibonacci Program OF 10 NUMBER




#include"stdio.h"
#include"conio.h"
#include"math.h"
void main()
{
clrscr();
int i,f0,f1=1,fibo;
printf("The Fibonacci Series is=");
for(i=1;i<=10;i++);
{
fibo=f0+f1;
printf("%d\t",fibo);
f1=f0;
f0=fibo;
}
getch();
}

Jan 26, 2013

1 may be located up to 100 odd number of average program

1 may be located up to 100 odd number of average program

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,sum=0;
float avg;
for(i=1;1<=100;i++)
{
if(%2)
sum+=i;
sum=sum+i;
}
avg=sum/50.0;
prinf("Average of odd nos (1-100):\n");
printf("%.2f",avg);
getch();
}

Popular Posts