I need to add prompts for the number, integer and character inputs separatly instead of all at once. I want it to say "enter a number" wait for input, "enter an integer" wait for input and "enter a character" wait for input. Then it is suppose to combine the inputs and print the out using the puts() command. Here is what I got, the program does what I want except for the prompts.
#include <stdio.h>
void getline(char []);
#define LSIZE 4
int main()
{
char message[LSIZE];
printf("Enter a number, integer and character \n");
getline(message);
printf("The string just entered is:\n");
puts(message);
return 0;
}
void getline(char strng[])
{
int i=0;
char c;
while(i < (LSIZE-1) && (c = getchar()) != '\n')
{
strng[i] = c;
i++;
}
strng[i] = '\0';
}