This commit is contained in:
2025-05-08 20:47:54 +03:00
parent 50a27f1d6c
commit 5bcb1746fe
4 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
srand(time(NULL));
int num = 1 + rand() % 999;
printf("%s\n%s\n%s\n", "I have a number between 1 and 1000.", "Can you guess my number?", "Please type your first guess.");
int scanNum = 0;
scanf("%d", &scanNum);
if((scanNum > 1001) || (scanNum < 0)) {
puts("Invalid integer!");
}
while(scanNum != num) {
if("")
}
}