- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
3 Posted Topics
hi all, below is a part of a car game am developing.can any one tell me how to accelerate my car while pressing a key(in this case,its'a') n also how to decelarate it? also tell me how to mov up or down while still pressing the 'a' key.i have to … | |
Re: hi mrlucky0, heres a similar prog.chk this also out.i feel this is quite simple than that of red_evolves. #include<iostream.h> #include<conio.h> void main() { clrscr(); int n,k,no,i,j,a,b,c; cout<<"\nenter n:"; cin>>n; if(n%2==0) n++; for(i=1;i<=n;i+=2) { for(j=i;j<n;j+=2) cout<<" "; for(k=1;k<=i;k++) cout<<"*"; cout<<"\n"; } for(i=n-2;i>=1;i-=2) { for(j=i;j<n;j+=2) cout<<" "; for(k=1;k<=i;k++) cout<<"*"; cout<<"\n"; } getch(); … | |
hi everyone, am quite new to graphics.am tryin to write a car game.i jus wanted to know how to use special keys(like arrow keys n function keys as inputs).can anyone help me? |
The End.