+ 3

What mistake have i done??

#include <stdio.h> int main() { int age; printf("Enter your age\n"); scanf("%d", &age); printf("%d You have Entered %d as your age\n", age); if (age>18){ printf("You can Vote"); } return 0; }

16th Nov 2021, 7:16 AM
Vinithkumar Alande
Vinithkumar Alande - avatar
2 ответов
+ 4
You have written %d two times inside the printf statement
16th Nov 2021, 7:18 AM
Saurabh
Saurabh - avatar
+ 3
https://code.sololearn.com/cn02RsC8bwst line: printf("%d You have Entered %d as your age\n", age); you have mentioned %d two times here and passed the age value only once
16th Nov 2021, 7:21 AM
Edwin
Edwin - avatar