Вы находитесь на странице: 1из 6

#include <stdio.

h>

#include <conio.h>

#include <iostream>

#include <time.h>

#include <windows.h>

void gotoxy(int x, int y)

COORD coord;

coord.X = x;

coord.Y = y;

SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);

void delay(unsigned int mseconds)

clock_t goal = mseconds + clock();

while (goal > clock());

void getup()

system("cls");

gotoxy(10,2);

printf("Press X to Exit, Press Space to Jump");

gotoxy(62,2);

printf("SCORE : ");

gotoxy(1,25);

for(int x=0;x<79;x++)

printf("ß");

}
int t,speed=40;

void ds(int jump=0)

static int a=1;

if(jump==0)

t=0;

else if(jump==2)

t--;

else t++;

gotoxy(2,15-t);

printf(" ");

gotoxy(2,16-t);

printf(" ÜÛßÛÛÛÛÜ");

gotoxy(2,17-t);

printf(" ÛÛÛÛÛÛÛÛ");

gotoxy(2,18-t);

printf(" ÛÛÛÛÛßßß");

gotoxy(2,19-t);

printf(" Û ÜÛÛÛÛßßß ");

gotoxy(2,20-t);

printf(" ÛÛÜ ÜÛÛÛÛÛÛÜÜÜ ");

gotoxy(2,21-t);

printf(" ßÛÛÛÛÛÛÛÛÛÛÛ ß ");

gotoxy(2,22-t);

printf(" ßÛÛÛÛÛÛÛß ");

gotoxy(2,23-t);

if(jump==1 || jump==2){

printf(" ÛÛß ßÛ ");


gotoxy(2,24-t);

printf(" ÛÜ ÛÜ ");

}else if(a==1)

printf(" ßÛÛß ßßß ");

gotoxy(2,24-t);

printf(" ÛÜ ");

a=2;

else if(a==2)

printf(" ßÛÜ ßÛ ");

gotoxy(2,24-t);

printf(" ÛÜ ");

a=1;

gotoxy(2,25-t);

if(jump!=0){

printf(" ");

else

printf("ßßßßßßßßßßßßßßßßß");

delay(speed);

void obj()

{
static int x=0,scr=0;

if(x==56 && t<4)

scr=0;

speed=40;

gotoxy(36,8);

printf("Game Over");

getch();

gotoxy(36,8);

printf(" ");

gotoxy(74-x,20);

printf("Û Û ");

gotoxy(74-x,21);

printf("Û Û ");

gotoxy(74-x,22);

printf("ÛÜÜÜÜÛ ");

gotoxy(74-x,23);

printf(" Û ");

gotoxy(74-x,24);

printf(" Û " );

x++;

if(x==73)

x=0;

scr++;

gotoxy(70,2);

printf(" ");

gotoxy(70,2);
printf("%d",scr);

if(speed>20)

speed--;

int main()

system("mode con: lines=29 cols=82");

char ch;

int i;

getup();

while(true)

while(!kbhit())

ds();

obj();

ch=getch();

if(ch==' ')

for(i=0;i<10;i++)

ds(1);

obj();

for(i=0;i<10;i++)

ds(2);
obj();

else if (ch=='x')

return(0);

Вам также может понравиться

  • FDFF
    FDFF
    Документ3 страницы
    FDFF
    Diego Castillo Hernandez
    Оценок пока нет
  • Snake Game
    Snake Game
    Документ5 страниц
    Snake Game
    Sharjeel 77
    Оценок пока нет
  • Tugas Grafkom
    Tugas Grafkom
    Документ13 страниц
    Tugas Grafkom
    Hari taruna
    Оценок пока нет
  • Dinosaur Game
    Dinosaur Game
    Документ2 страницы
    Dinosaur Game
    Manas Singh
    Оценок пока нет
  • OOPs CBS Codes
    OOPs CBS Codes
    Документ27 страниц
    OOPs CBS Codes
    Ettu american
    Оценок пока нет
  • Struct Char Int Float
    Struct Char Int Float
    Документ5 страниц
    Struct Char Int Float
    Kishore Rao
    Оценок пока нет
  • Code 2
    Code 2
    Документ58 страниц
    Code 2
    AdityaChaturvedi
    Оценок пока нет
  • Tutorial C++
    Tutorial C++
    Документ10 страниц
    Tutorial C++
    Itaparal Nayyr
    Оценок пока нет
  • Graphics Program
    Graphics Program
    Документ18 страниц
    Graphics Program
    Sowmiya
    Оценок пока нет
  • SOUCRCECODE
    SOUCRCECODE
    Документ26 страниц
    SOUCRCECODE
    Kushal Patil
    Оценок пока нет
  • 00 Liz Roy Doc
    00 Liz Roy Doc
    Документ9 страниц
    00 Liz Roy Doc
    ssfofo
    Оценок пока нет
  • CG Prac File
    CG Prac File
    Документ59 страниц
    CG Prac File
    soc11559
    Оценок пока нет
  • CG Programs
    CG Programs
    Документ15 страниц
    CG Programs
    Mohammad Ismail Naaz
    Оценок пока нет
  • C++ Coding Employee Management System
    C++ Coding Employee Management System
    Документ58 страниц
    C++ Coding Employee Management System
    eternities
    69% (13)
  • C++ Project
    C++ Project
    Документ27 страниц
    C++ Project
    Amisha Sharon
    Оценок пока нет
  • Simulation of Rotating Triangle
    Simulation of Rotating Triangle
    Документ18 страниц
    Simulation of Rotating Triangle
    Bhagwan Bhosle
    Оценок пока нет
  • C++ Programs
    C++ Programs
    Документ13 страниц
    C++ Programs
    Tanisha Chaudhary
    Оценок пока нет
  • Snake Game: A C++ Programme
    Snake Game: A C++ Programme
    Документ23 страницы
    Snake Game: A C++ Programme
    Amisha Sharon
    Оценок пока нет
  • Ballon Documentation1
    Ballon Documentation1
    Документ24 страницы
    Ballon Documentation1
    Svg Agarbatti
    Оценок пока нет
  • CGM File Codes
    CGM File Codes
    Документ6 страниц
    CGM File Codes
    Naman jain
    Оценок пока нет
  • Program
    Program
    Документ11 страниц
    Program
    Sumit Pal Singh
    Оценок пока нет
  • CG Computer Graphics Lab
    CG Computer Graphics Lab
    Документ45 страниц
    CG Computer Graphics Lab
    Jeng Dev
    Оценок пока нет
  • Tema @
    Tema @
    Документ2 страницы
    Tema @
    AntonioArdelean
    Оценок пока нет
  • C++ Source Codes
    C++ Source Codes
    Документ14 страниц
    C++ Source Codes
    katkesav
    Оценок пока нет
  • CS Project by Aman.W
    CS Project by Aman.W
    Документ24 страницы
    CS Project by Aman.W
    Sarika Verma
    Оценок пока нет
  • Write A C Program To Simulate Bit Stuffing and De-Stuffing
    Write A C Program To Simulate Bit Stuffing and De-Stuffing
    Документ23 страницы
    Write A C Program To Simulate Bit Stuffing and De-Stuffing
    supriya
    Оценок пока нет
  • Suganya
    Suganya
    Документ5 страниц
    Suganya
    kamilasyed
    Оценок пока нет
  • Railway Ticket Reservation
    Railway Ticket Reservation
    Документ41 страница
    Railway Ticket Reservation
    Nithish S
    Оценок пока нет
  • CG4
    CG4
    Документ24 страницы
    CG4
    Ujjawal Mallik
    Оценок пока нет
  • Link Click
    Link Click
    Документ36 страниц
    Link Click
    xiso2507
    Оценок пока нет
  • CG All Practicals
    CG All Practicals
    Документ33 страницы
    CG All Practicals
    Colab Practical
    Оценок пока нет
  • Code Snake
    Code Snake
    Документ11 страниц
    Code Snake
    Tước Nguyễn
    Оценок пока нет
  • 3064 A CG Assignment-2
    3064 A CG Assignment-2
    Документ57 страниц
    3064 A CG Assignment-2
    nokexo6067
    Оценок пока нет
  • Railway Ticket Reservation
    Railway Ticket Reservation
    Документ41 страница
    Railway Ticket Reservation
    Katniss Tathagata
    Оценок пока нет
  • CCN - Part-B Programs
    CCN - Part-B Programs
    Документ11 страниц
    CCN - Part-B Programs
    Suhas h r
    Оценок пока нет
  • Graphics Ass Docs
    Graphics Ass Docs
    Документ42 страницы
    Graphics Ass Docs
    Sufiyan Mohammed
    Оценок пока нет
  • Airlines Reservation Sytemterm Paper of Cse
    Airlines Reservation Sytemterm Paper of Cse
    Документ16 страниц
    Airlines Reservation Sytemterm Paper of Cse
    Anish Goel
    Оценок пока нет
  • Airlines Reservation Sytemterm Paper of Cse
    Airlines Reservation Sytemterm Paper of Cse
    Документ17 страниц
    Airlines Reservation Sytemterm Paper of Cse
    Neha Modi
    Оценок пока нет
  • CD File
    CD File
    Документ3 страницы
    CD File
    Raj Maddhesia
    Оценок пока нет
  • Game
    Game
    Документ10 страниц
    Game
    Sathya Kosana
    Оценок пока нет
  • Include
    Include
    Документ4 страницы
    Include
    Basant_Singh_9204
    Оценок пока нет
  • Steps To Install Graphics.H in Codeblocks
    Steps To Install Graphics.H in Codeblocks
    Документ46 страниц
    Steps To Install Graphics.H in Codeblocks
    vaibhav pandey
    Оценок пока нет
  • 2016ump3537 2
    2016ump3537 2
    Документ23 страницы
    2016ump3537 2
    Nishant Garg
    Оценок пока нет
  • RISHA SINGh CG
    RISHA SINGh CG
    Документ4 страницы
    RISHA SINGh CG
    Risha Singh
    Оценок пока нет
  • Hang Man Game Code: Github
    Hang Man Game Code: Github
    Документ47 страниц
    Hang Man Game Code: Github
    duggubabu
    Оценок пока нет
  • Snake Game
    Snake Game
    Документ7 страниц
    Snake Game
    parth
    Оценок пока нет
  • Client
    Client
    Документ37 страниц
    Client
    hamzasaleem65900e
    Оценок пока нет
  • Cryp Practical - RSU1816017 PDF
    Cryp Practical - RSU1816017 PDF
    Документ20 страниц
    Cryp Practical - RSU1816017 PDF
    Atri Joshi
    Оценок пока нет
  • Periodic Table C++
    Periodic Table C++
    Документ19 страниц
    Periodic Table C++
    tushar verma
    Оценок пока нет
  • Airlines Reservation Sytemterm Paper of Cse
    Airlines Reservation Sytemterm Paper of Cse
    Документ17 страниц
    Airlines Reservation Sytemterm Paper of Cse
    hi_itssandeep
    Оценок пока нет
  • Pizzle Game
    Pizzle Game
    Документ4 страницы
    Pizzle Game
    Aung Tike
    Оценок пока нет
  • A Program To Show Various Numerical Method
    A Program To Show Various Numerical Method
    Документ11 страниц
    A Program To Show Various Numerical Method
    Atul Goel
    Оценок пока нет
  • Hangman Game
    Hangman Game
    Документ15 страниц
    Hangman Game
    rohan_twr
    Оценок пока нет
  • Ball Bouncing
    Ball Bouncing
    Документ19 страниц
    Ball Bouncing
    Sarath S Nair
    Оценок пока нет
  • Cryptography Fundamentals Lab Assignment - 5: Code
    Cryptography Fundamentals Lab Assignment - 5: Code
    Документ8 страниц
    Cryptography Fundamentals Lab Assignment - 5: Code
    Surya Vjkumar
    Оценок пока нет
  • Computer Graphics File 2
    Computer Graphics File 2
    Документ22 страницы
    Computer Graphics File 2
    Vanshita Rajput
    Оценок пока нет
  • Visha Goel C Projec
    Visha Goel C Projec
    Документ24 страницы
    Visha Goel C Projec
    Vishal Chetal
    Оценок пока нет
  • Computer Engineering Laboratory Solution Primer
    Computer Engineering Laboratory Solution Primer
    От Everand
    Computer Engineering Laboratory Solution Primer
    Оценок пока нет
  • Productivity Now: Social Administration, Training, Economics and Production Division
    Productivity Now: Social Administration, Training, Economics and Production Division
    От Everand
    Productivity Now: Social Administration, Training, Economics and Production Division
    Оценок пока нет
  • Winds of Folly
    Winds of Folly
    От Everand
    Winds of Folly
    Оценок пока нет
  • Gcc4.4.4 Multilib Toolchain Release Note
    Gcc4.4.4 Multilib Toolchain Release Note
    Документ12 страниц
    Gcc4.4.4 Multilib Toolchain Release Note
    pavanbellam
    Оценок пока нет
  • Ques 1: WAP To Implement DDA Algorithm
    Ques 1: WAP To Implement DDA Algorithm
    Документ13 страниц
    Ques 1: WAP To Implement DDA Algorithm
    Jai Chaudhry
    Оценок пока нет
  • Log
    Log
    Документ4 страницы
    Log
    iscak2107
    Оценок пока нет
  • GNU Toolchain For ARC
    GNU Toolchain For ARC
    Документ154 страницы
    GNU Toolchain For ARC
    AblazeVassilas
    100% (1)
  • IBM C Meta Programming Guide 2019 Ccrug00 v2r3
    IBM C Meta Programming Guide 2019 Ccrug00 v2r3
    Документ188 страниц
    IBM C Meta Programming Guide 2019 Ccrug00 v2r3
    zhang
    Оценок пока нет
  • Lab1 (Introduction To C Language)
    Lab1 (Introduction To C Language)
    Документ6 страниц
    Lab1 (Introduction To C Language)
    zaid Ahmad
    Оценок пока нет
  • Lab 5 - Solution
    Lab 5 - Solution
    Документ3 страницы
    Lab 5 - Solution
    Nawaf Alshareef
    Оценок пока нет
  • Program:: Sri Sai Aditya Institute of Science and Technology
    Program:: Sri Sai Aditya Institute of Science and Technology
    Документ5 страниц
    Program:: Sri Sai Aditya Institute of Science and Technology
    Rajeev Nakka
    Оценок пока нет
  • Dfa Simulation
    Dfa Simulation
    Документ5 страниц
    Dfa Simulation
    Mohsan Azad
    Оценок пока нет
  • HSC ICT Chapter 5 Note (Only Important)
    HSC ICT Chapter 5 Note (Only Important)
    Документ20 страниц
    HSC ICT Chapter 5 Note (Only Important)
    Srijon Sharma
    100% (7)
  • Python Mini - Project - Reprot Final-1
    Python Mini - Project - Reprot Final-1
    Документ41 страница
    Python Mini - Project - Reprot Final-1
    Katherine Dee
    Оценок пока нет
  • #Include #Include #Include Void Main (
    #Include #Include #Include Void Main (
    Документ47 страниц
    #Include #Include #Include Void Main (
    Chf
    Оценок пока нет
  • Coide Dev Manual
    Coide Dev Manual
    Документ132 страницы
    Coide Dev Manual
    Ian Reischauer
    Оценок пока нет
  • OS Record
    OS Record
    Документ19 страниц
    OS Record
    KAVIARASU.D
    Оценок пока нет
  • Xor Encryption.c
    Xor Encryption.c
    Документ3 страницы
    Xor Encryption.c
    Ashwin King
    Оценок пока нет
  • Whatsnew
    Whatsnew
    Документ37 страниц
    Whatsnew
    Reddy
    Оценок пока нет
  • OS Expts
    OS Expts
    Документ7 страниц
    OS Expts
    Prisly Mary Jacob
    Оценок пока нет
  • C Programming With Solutions
    C Programming With Solutions
    Документ198 страниц
    C Programming With Solutions
    victor othugadi
    0% (1)
  • Lab Report Experiment 1
    Lab Report Experiment 1
    Документ14 страниц
    Lab Report Experiment 1
    MUHAMMAD HARIZ HAIKAL BIN AZAMKHAIRI
    Оценок пока нет
  • Two Stacks in Single Array
    Two Stacks in Single Array
    Документ5 страниц
    Two Stacks in Single Array
    vpichandi
    Оценок пока нет
  • Segunda Unidad Tarea 1
    Segunda Unidad Tarea 1
    Документ14 страниц
    Segunda Unidad Tarea 1
    Alexander Rosales
    Оценок пока нет
  • Arm Crossworks Reference Manual PDF
    Arm Crossworks Reference Manual PDF
    Документ1 530 страниц
    Arm Crossworks Reference Manual PDF
    erkkiankara
    Оценок пока нет
  • assignment.h-WPS Office
    assignment.h-WPS Office
    Документ8 страниц
    assignment.h-WPS Office
    Fikayo Adele
    Оценок пока нет
  • Getting Started: Embedded Software Design
    Getting Started: Embedded Software Design
    Документ139 страниц
    Getting Started: Embedded Software Design
    Thinseep
    Оценок пока нет
  • Symantec™ Protection Engine For Network Attached Storage 8.1 C SDK Guide
    Symantec™ Protection Engine For Network Attached Storage 8.1 C SDK Guide
    Документ75 страниц
    Symantec™ Protection Engine For Network Attached Storage 8.1 C SDK Guide
    RobertFenea
    Оценок пока нет
  • CG File
    CG File
    Документ11 страниц
    CG File
    bheem
    Оценок пока нет
  • EZTwain User Guide
    EZTwain User Guide
    Документ141 страница
    EZTwain User Guide
    Cristina Duron Borjas
    Оценок пока нет
  • Code
    Code
    Документ7 страниц
    Code
    krishnamahadik
    Оценок пока нет
  • Os Lab Assignment
    Os Lab Assignment
    Документ13 страниц
    Os Lab Assignment
    Dikshansh Lodhi
    Оценок пока нет
  • 5 C7 B097 BD 01
    5 C7 B097 BD 01
    Документ411 страниц
    5 C7 B097 BD 01
    naumanbangalore
    Оценок пока нет