C Program to Print Good Morning Evening Night according to Time

In this tutorial you will learn about the C Program to Print Good Morning Evening Night according to Time and its application with practical example.

C Program to Print Good Morning Evening Night according to Time

In this tutorial, we will learn to create a C program that will Print Good Morning Evening Night according to Time in C programming.

Prerequisites

Before starting with this tutorial we assume that you are best aware of the following C programming topics:

  • Operators in C Programming.
  • Basic Input and Output function in C Programming.
  • Basic C programming.
  • Conditional Statements in c programming.

A program that will Print Good Morning, Evening, Night according to Time

As we all know the C programming is a very powerful programming language.With the help of which we can take input in all datatypes. In today’s program, we will create a c program that will take the input in the form of an integer, and then it will calculate the time and Print Good Morning, Evening, Night according to Time. 

Algorithm:-

With the help of this program, we can Print Good Morning, Evening, Night according to Time.

 

Program to Print Good Morning Evening Night according to Time:-

 

Output:-

In the above program, we have first initialized the required variable.

  • t = it will hold the integer value for time input.

Input strings from the user.

Calculating the time taken from input and printing the Greeting message.

 

In this tutorial we have learn about the C Program to Print Good Morning Evening Night according to Time and its application with practical example. I hope you will like this tutorial.