Breaking

Write a program in C to read any day number in integer and display day name in the wordtest like 1:->Sunday.


#include <stdio.h>
void main()
{
    int day;
   
    printf("Enter a days : ") ;
    scanf(" %d", & day) ;
   
    if(day==1)
    {
    printf (" Sunday)") ;
    }
    if(day==2)
    {
    printf (" Monday ") ;
    }
    if(day==3)
    {
    printf (" Tuesday ") ;
    }
    if(day==4)
    {
    printf ("Wednesday ") ;
    }
    if(day==5)
    {
    printf(" Thursday ") ;
    }
    if(day==6)
    {
    printf (" Friday ") ;
    }
    if(day==7)
    {
        printf (" Saturday ") ;
    }
Simple Output :
Enter days : 3
Tuesday