Posts

Showing posts with the label Weekday C Program

Print Week day program in C | Cpp | Java | php | go

Program Description Program to print weekdays based on the user input, Example: For 0 print Sunday, 1 print Monday and so on. C Program #include<stdio.h> int main() { int day; printf("Enter weekday, say(0-6): "); scanf("%d",&day); switch(day) { case 0: printf("Sunday"); break; case 1: printf("Monday"); break; case 2: printf("Tuesday"); break; case 3: printf("Wednesday"); break; case 4: printf("Thrusday"); break; case 5: printf("Friday"); break; case 6: printf("Saturday"); break; default: printf("Invalid input"); } return 0; } C++ Program #include<iostream&g using namespace std; int main() { int day; cout << "Enter any day, say(0-6): "; cin >> day; switch(day) { case 0: cout << "Sunday"; break; case 1: cout << "Monday&q

Popular posts from this blog

String in golang

Inline V/S Block Level Element

Arrays in C Language

Data Types in Go language

Printing in C programming

Variable Naming & Scope of Variable

Escape Sequence | Formatted Printing | Interview Questions

Floating point Data types in Go lang

Overview of Go lang

Literals in Java