How to make an algorithm that receives the name of a day of the week and shows the subject that the student has on the [closed]

-4

I'm not sure what to do, but I do not know what to do, but I do not know what to do. to do in C.

"Develop a C program that receives a day of the week and shows which course (s) you have on that day of the week"

    
asked by anonymous 24.10.2017 / 14:33

1 answer

1

Try to do this:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){ 
    char dia[50];
    printf("Digite o dia da semana: \n");
    scanf("%s",dia);

    if(strcmp(dia,"segunda") == 0){
        printf("\nEh segunda!");
    }else{
        printf("\nNao eh segunda!");
    }

    return 0;
}
    
24.10.2017 / 14:43