I would just want to ask questions on how to partly program snake using my current knowledge of "if-else, for, switch, while, printf/scanf, counters and using only int, float and char as variables... and also what to #include like <stdio.h> and what more...??? If you think I can with my knowledge of such...how should i start?? I mean it's my first time prgramming a GAME in C so i'm not yet familiar... with how to use other functions needed such as time.h and gotoxy...can u give me some tips or help probably?
a sample program i programmed.. we are mostly mathematical based so GAMES are not familiar to me in programming:
/*Asks the user to input a binary number then converts it into decimal*/
Code:
#include<stdio.h>
main()
{ int nBin, nDec, nMult, nDigit;
printf("Enter Binary Number:");
scanf("%d", &nBin);
nDec=0;
nMult=1;
while(nBin!=0)
{nDigit=nBin%10;
nDec+=nDigit*nMult;
nMult*=2;
nBin/=10;
}
printf("Decimal: %d", nDec);
getchar();
getchar();
}
note: BTW.., i'm just a freshman in college so don't be so harsh in programming terms.. i mean show tips on very basic c like the program i made... if you would like... thanks =D