C program to accept name and display the name with good morning message.





code:-

#include<stdio.h>
int main()
{
  int time;
  char name[20];
 
  printf("Enter your name:");
  gets(name);
 
  printf("Enter time:");
  scanf("%d", &time);
 
  if(time < 12)
  {
     printf("Good Morning...%s", name);
  }
  return 0;
}

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post