NTech

Menu
  • Home
  • Technology
    • Internet
    • Market
    • Stock
  • Downloads
    • Dvd
    • Games
    • Software
      • Office
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Uncategorized

Tuesday, 28 June 2016

How to create a moving car effect in C programming

By ntech02:07 No comments
#include "graphics.h"
#include "conio.h"
#include "dos.h"
void main()
{
int gdriver=DETECT,gmode,i=0,j=0;
initgraph(&gdriver,&gmode,”c:\turboc3\bgi”);
for(i;i<420;++i)
{
line(0,245,650,245);
line(0+i,200,210+i,200);
line(50+i,200,70+i,170);
line(70+i,170,140+i,170);
line(140+i,170,160+i,200);
line(85+i,170,85+i,200);
line(125+i,170,125+i,200);
line(0+i,200,0+i,230);
line(210+i,200,210+i,230);
line(0+i,230,50+i,230);
circle(65+i,230,15);
line(80+i,230,130+i,230);
circle(145+i,230,15);
line(210+i,230,160+i,230);
pieslice(65+i,230,359-j,360-j,15);
pieslice(65+i,230,179-j,180-j,15);
pieslice(65+i,230,89-j,90-j,15);
pieslice(65+i,230,269-j,270-j,15);
pieslice(145+i,230,359-j,360-j,15);
pieslice(145+i,230,179-j,180-j,15);
pieslice(145+i,230,89-j,90-j,15);
pieslice(145+i,230,269-j,270-j,15);
if(j==179)
j=0;
++j;
delay(30);
cleardevice();
}
closegraph();
}
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Pages

  • Home

Popular Posts

  • What Is A Motherboard? What Are The Different Components Of A Motherboard?
    What Is A Motherboard? What Are The Different Components Of A Motherboard? Image: Wikipedia Short Bytes: A motherboard acts as a pl...
  • Fingerprint scanners on Android phones are far less secure than on iPhones
    The  Samsung Galaxy S5's fingerprint reader security vulnerabilities  were well documented over a year ago. But if you were hoping t...
  • C program to Calculate Factorial of a Number Using ...
    #include<stdio.h> #include<conio.h> void main() { int a,f=1,i; clrscr(); printf("Factorial i : "); ...
  • Master Python: Save over 95% on 50+ hours of training
    Master Python: Save over 95% on 50+ hours of training For prog...
  • FIND FACTORIAL OF A NUMBER USING RECURSION IN C PROGRAM
    #include<stdio.h> #include<conio.h> int fact(int); void main() {   int num,f;   clrscr();   printf("\nEnter a numbe...
  • How To Enable GodMode In Windows and Its Complete Features
    How To Enable GodMode In Windows and Its Complete Features What is GodMode? Windows GodMode is an old trick, but I thought it’d be ...
  • How to Hide and UnHide Any Drive in Windows Using Command Prompt
    How to Hide Any Drive in Windows Using Command Prompt Method 1 of 2 Step 1: Type CMD in Start menu search area and hit Enter to la...
  • FREE! That’s Right, I’m Giving Away MILLIONS of FREE Microsoft eBooks again! Including: Windows 10, Office 365, Office 2016, Power BI, Azure, Windows 8.1, Office 2013, SharePoint 2016, SharePoint 2013, Dynamics CRM, PowerShell, Exchange Server, System Center, Cloud, SQL Server and more!
    FREE! That’s Right, I’m Giving Away MILLIONS of FREE Microsoft eBooks again! Including: Windows 10, Office 365, Office 2016, Power BI, A...
  • HP PCs - Finding the System Serial Number on Your Computer
    Command Prompt (Windows) Find your serial number by typing a command into Windows. In Windows, search for and open  CMD.EXE . A co...
  • Biggest Rivalries in Computing History
    Pepsi vs. Coke, Edison vs. Tesla, Star Wars vs. Star Trek, history is filled with famous rivalries, but few have matched the intensity and...

Recent Posts

Text Widget

Pages

  • Home

Blog Archive

  • ►  2019 (2)
    • ►  May (1)
    • ►  April (1)
  • ►  2017 (7)
    • ►  July (1)
    • ►  April (3)
    • ►  March (3)
  • ▼  2016 (50)
    • ►  October (1)
    • ►  September (4)
    • ►  July (2)
    • ▼  June (6)
      • It’s Official: Android N Is Android Nougat
      • How To Create Undeletable Folder In Windows
      • Russia Is Making A New Linux-based Mobile Operatin...
      • How To Hide Your Secret Files Inside An Image
      • How to create a moving car effect in C programming
      • How to Hide and UnHide Any Drive in Windows Using ...
    • ►  April (2)
    • ►  March (5)
    • ►  February (28)
    • ►  January (2)
  • ►  2015 (9)
    • ►  August (9)
Powered by Blogger.

Text Widget

About Me

ntech
View my complete profile

Copyright © NTech | Powered by Blogger
Design by Flythemes | Blogger Theme by NewBloggerThemes.com