#include<stdio.h>
main()
{
int x;
int r;
char response;
srand( time(NULL) );
do{
printf("I have a number between 1 and 10.\n");
Type: Posts; User: lancehumiston
#include<stdio.h>
main()
{
int x;
int r;
char response;
srand( time(NULL) );
do{
printf("I have a number between 1 and 10.\n");
yeah i am unsure how to recieve their response, is it possible with a scanf? if so, how do i store their response? scanf("%d?
thank you i was getting an undefined symbol message but i put the...
how should i define NULL in srand( time(NULL) );? i thought unsigned was the correct way?
Also i just went through the tutorial on loops and it didn't tell me anything about changing a user's...
i know where the loop needs to be my question was more along the lines of how do i create the loop while (?) and how do i use the user's respons (y or n) to return a true or false for the loop?
main()
{
int x;
int r;
unsigned NULL;
printf("I have a number between 1 and 10.\n");
printf("Can you guess my number?\n");
printf("Please type your first guess.\n");
scanf("%d", &x);
srand(...