Computer Science, asked by abhishekya00dav, 8 months ago

Write a program to input week numbe and pirnt it's corresponding week day. Example = Input: Week number=1 Output : Week day = Monday

Answers

Answered by sahil10august
6

#include<stdio.h>

int main()

{ int n;

printf("Week No.\n");

scanf("%d",&n);

switch(n)

{

case 1:

printf("Monday");

break;

case 2:

printf("Tuesday");

break;

case 3:

printf("Wednesday");

break;

case 4:

printf("Thursday");

break;

case 5:

printf("Friday");

break;

case 6:

printf("Saturday");

break;

case 7:

printf("Sunday");

break;

default :

printf("Invalid Input!");

break;

}

return 0;

}

If find helpful Mark it as brainiest and give a thanks

Sahil

Answered by Anonymous
25

☃️__________________________☃️

Explanation:

public class Something

{

public static void main(int ch)

{

System.out.println("Enter1 forMonday );

System.out.println("Enter2 for Tuesday);

System.out.println("Enter 3 for Wedsesday );

System.out.println("Enter 4 for Thursday);

System.out.println("Enter 5 for Friday );

System.out.println("Enter 6 for Saturday);

Sysem.out.println("Enter 7 for Sunday);

switch(ch)

{

case 1:

System.out.println("Monday" );

break;

case2 :

System.out.println("Tuesday" );

break;

case3 :

System.out.println("Wednesday" );

break;

case 4:

System.out.println("Thursday" );

break;

case 5:

System.out.println("Friedy" );

break;

case 6:

System.out.println("Saturday" );

break;

case7 :

System.out.println("Sunday" );

break;

default:

System.out.println("Invalid Choice");

}

}

}

above program written using java language

hope it helped you:)

☃️__________________________☃️

by@ItzNobody

Similar questions