hi,
can anyone tell me how to clear the cmd screen, I have commeneted where it should be "//to clear the screen from here"
#include <stdio.h>
#include <stdlib.h>
int main()
{
int hp = 100;
int choice;
while (hp > 0){
//to clear the screen from here
printf("1.Attack\n\n");
printf("2.Magic hit\n\n");
printf("3.ultimate\n\n");
printf("enemy hp %d:\n\n", hp);
scanf ("%d", &choice);
if(choice == 1){
hp = hp - 20;
printf("\nhit for 20\n");
}
if(choice == 2){
hp = hp - 25;
printf("\nmagic hit for 25\n\n");
}
if(choice == 3){
hp = hp - 50;
printf("\nultimate for 50\n\n");
}
//printf("\n\nenemy hp: %d\n\n", hp);
}
printf("\nenemy defeated\n");
return 0;
}