To convert sq.ft to acres by c language | Sololearn: Learn to code for FREE!

0

# To convert sq.ft to acres by c language

Acre=sq.ft/43620.1704 Mandatory test case1: float trackLand, trackLandAcred Mandatory test case 2: scanf Mandatory test case 3 : printf https://code.sololearn.com/cch2wg9N7BlE input :45587.23 And output : 45587.23 sq.ft is equal to 1.05 acres I got everything correct but my mandatory test case 1 failed..... I am not sure where I made mistake

10/20/2021 2:22:57 AM

morgan

+1

Maybe you're printing the words wrong, for example "acres" instead of "Acres". Check these kind of mistakes. Also prefer double to float when storing this kind of accuracy-needed values. Try and say the result. All the best =)

+1

May your test cases failing because of formatting your read input and output format properly Click on first test case and see what your output showing Once try this #include <stdio.h> int main() { float trackLand,trackLandAcred; scanf("%f", &trackLand); trackLandAcred=trackLand/43620.1704; printf("%.2f is equal to %.2f acres",trackLand ,trackLandAcred); return 0; }

+1

Can u provide me link where u testing

+1

Once show failed test case screenshot what input your compiler expecting

+1

I think your test case failing because of constraints their is constraints your input should be between 20000.00 to 70000.00 U have to check this also your input is between these numbers or not just use simply if statement with &&

+1

Your variable declaration should be: "float tractLand, tractLandAcred;" But you did it as: "float trackLand, trackLandAcred;" While your mistake is solved, all these information should not be validated by the code editor (like the variable names and stuff). This stops the students from doing stuff on their own. All the best =)

0

Actually output should be in acres not Acres

0

I tried this way output is correct but mandatory test case 1 failed

0

Sorry,Actually I am doing my school homework so I can't share the link because I have to say everything like user name, password ....

0

https://prntscr.com/1wsu8nw

0

https://prntscr.com/1wsua7a

0

https://prntscr.com/1wsubx1

0

Thank you very very much