0

anyone can help me

#include <stdio.h> #include <string.h> typedef struct { int hour; int minute; int second; }time; void main() { time t; printf("Input Hour: ");scanf("%d",&t,hour); printf("Input Minute: ");scanf("%d",&t,minute); printf("Input Second: ");scanf("%d",&t,second); puts("Time: "); printf("%d : %d : %d", t.hour, t.minute, t.second); } My question: Whats wrong??

4th Apr 2021, 9:59 AM
guesttt staarrr__
guesttt staarrr__ - avatar
2 ответов
+ 2
Brother you uses &the, hour and &t, minute and &t, second it's wrong right method is &t.hourand &t.minute and &t.second
4th Apr 2021, 10:02 AM
Rohit Maurya
Rohit Maurya - avatar
+ 2
Adding after Rohit, void main() is non standard definition. Use int main() instead.
4th Apr 2021, 10:57 AM
Ipang