Tagged: find weekday based on weekday number

Program in C to find weekday based on weekday number 1

Program in C to find weekday based on weekday number

The below program in C will find out weekday based on the weekday number input. We will be following the below logic. 1 -> Sunday 2 -> Monday 3 -> Tuesday 4 -> Wednesday 5 -> Thursday 6 -> Friday 7 -> Saturday Here we are accepting the week day number as input from the user and use switch statement to display the weekday. Below is the program in C. #include<stdio.h> #include<conio.h> void main(){ int day; clrscr(); printf(“Enter the day number: “); scanf(“%d”, &day); switch(day){ case 1: printf(“\nIts Sunday”); break; case 2: printf(“\nIts Monday”); break; case 3: printf(“\nIts Tuesday”); break;...

FREE C Cheatsheet - Speed Up Your C Programming.

FREE C Cheatsheet - Speed Up Your C Programming.

Download a 7-page free cheat sheet for easy and quick access to C Concepts, Snippets, and Syntax.

Thank you! Check you inbox and access your cheat-sheet