0
Please what is wrong with this program?
2 Answers
+ 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.
+ 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