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

12th Oct 2024, 5:26 PM
Sanjana
Sanjana - avatar
4 Answers
+ 1
Can you please show your attempt by pasting your code in the code playground and attach it here
12th Oct 2024, 5:51 PM
Aysha
Aysha - avatar
+ 1
Show your code. Mention the task name. Your link will work only for you
12th Oct 2024, 5:51 PM
Lisa
Lisa - avatar
+ 1
you are trying to multiply strings. you can only multiply numbers
14th Oct 2024, 5:02 AM
Lisa
Lisa - avatar
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
14th Oct 2024, 2:53 AM
Sanjana
Sanjana - avatar