0

Please what is wrong with this program?

https://code.sololearn.com/cNo8AXrJmaMt/?ref=app

17th Aug 2022, 12:11 PM
Zacchaeus Emmanuel
Zacchaeus Emmanuel - avatar
2 ответов
+ 5
Are you trying to write C++ or C code? Please clarify. Have you looked at the sololearn courses yet? Your code misses some closing "}", ";" at line ends and has unused variables.
17th Aug 2022, 12:20 PM
Lisa
Lisa - avatar
+ 4
https://www.sololearn.com/Discuss/2329233/?ref=app Check this #include <stdio.h> //#include <conio.h> int main() { int age1,age2,dob1,dob2; printf("enter your dob1"); scanf("%d",&dob1); printf("enter your dob2"); scanf("%d",&dob2); age1 = 2022 - dob1; age2 = 2022 - dob2; if (age1>age2){ printf("age1 is older"); }else if (age2>age1){ printf("age2 is older"); }else { printf("of equal age");} return 0; } //some error clears but why i can't input anything //you need to put ; in 9,10 lines // or correct value assigning
17th Aug 2022, 3:24 PM
Mihir Lalwani
Mihir Lalwani - avatar