i've been trying to write this program and it just doesn't do what it is supposed to, and i've looked for solutions online but i can't figure out what's wrong, can you give me a hand? (The program is in Portuguese, because i was doing it in my language but it is quite understandable.
The exercise is: Write a program that allows you to indicate, from a determined number of hours, which minutes, seconds, or even the tenths of a second, that this number of hours contains using switch.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int h,m,s,ds;
printf("Introduza o nr de horas:\n");
scanf( "%d" , &h);
m = h*60;
s = h*60*60;
ds = h*60*60*10;
scanf( "%d%d%d" , &m, &s, &ds);
switch (h)
{
case 'a' : printf(" Tem: %d minutos" , m);
case 'b' : printf(" Tem: %d segundos" , s);
case 'c' : printf(" Tem: %d decimos de segundo" , ds);
default : printf("Medida incorreta");
}
}