#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
FILE *fp;
char ch,file[10];
clrscr();
printf(“Enter file name:”);
scanf(“%s”,file);
fp=fopen(file,”w”); //file opening
if(fp==NULL) //exit program if file doesn’t open
{
printf(“File could not open!!”);
exit(0);
}
printf(“Enter data(* to exit)n”);
while(1)
{
ch=getche();
if(ch==’*’) //exit when * is pressed
exit(0);
putc(ch,fp);
}
fclose(fp); //file closing
}
A cycle is moving on a road this should be write in c lang ..
can anyone help me out ?
Read this program http://thecrazyprogrammer.com/2013/04/simple-program-to-create-moving-car-in.html. It is a program to move a car, the same concept will work for cycle. You have to design a cycle using graphics functions like circle(), line(), etc and use the concept of moving of car as mentioned in above car program.
I hope this will help you, if you need any other help then let me know.