C Program to find the Day Name of a Week

In this tutorial you will learn about the C Program to find the Day Name of a Week and its application with practical example.

C Program to find the Day Name of a Week

In this tutorial, we will learn to create a C program that will Find the Day Name of a Week using C programming.

Prerequisites

Before starting with this tutorial, we assume that you are the 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.
  • Arithmetic operations in C Programming.

Algorithm:-

Find the Day Name of a Week:-

In today’s program, we will take the input day in a range between 1 to 7 from the user. Then we will pass that variable to the conditional statements to find the name of days. At last, we will print the resulting name of the day to the user.

With the help of the below program, we can find the name of the day in a week.

Program Code:-

 

Output:-

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

  • wd = it will hold the integer value for the input.

Taking the input day from the user.

Finding the name of the day in a week.

Printing output.

In this tutorial we have learn about the C Program to find the Day Name of a Week and its application with practical example. I hope you will like this tutorial.