0
Code coach
Three of the test cases in the balconies code coach are correct but two of the locked cases are false , please do give a hint on what might be wrong in the code I have written https://www.sololearn.com/coach/24?ref=app
4 Answers
+ 1
Can you please show your attempt by pasting your code in the code playground and attach it here
+ 1
Show your code. Mention the task name.
Your link will work only for you
+ 1
you are trying to multiply strings. you can only multiply numbers
0
#include <stdio.h>
int main() {
char a[4],b[4]; // inputing the string
scanf("%s",a);
scanf("%s",b);
if((a[0]*a[2])>(b[0]*b[2])) //multiplying the first and the third element of the string
printf("Apartment A");
else
printf("Apartment B");
return 0;
}
This is my code
And the problem name is balconies