+ 4
What's wrong in this code..??
Every time I get the output as "Area is lesser than perimeter " even it is not https://code.sololearn.com/cHj314nyyxqm/?ref=app
13 Antworten
+ 5
scanf("%f%f",&a,&b); should probably be scanf("%f%f",&l,&b);
+ 2
You are asking for a and b.
scanf("%f%f",&a,&b);
But
A stands for area.
are you looking for l and b
+ 2
An easy way to debug this type of error is to print the numbers you entered back to the user before displaying the result. If you dont want that output in the final program simply comment it out.
Use something like
printf("Area %f length %f breadth %f peremiter %f", a, l, b, p);
Then put // in front of the line when the program is working correctly.
+ 1
You havent included curly braces after if statement
+ 1
@@smike_designer!!🤓 you don't really need to do this in some cases
+ 1
See the last line of code... it's just for fun :)
0
Thanks a lot bro....
0
I got that :)
0
U will get the meaning of char arry if you look at the end of the code.... it is just for fun. :)
0
Take l and b more than 9,you will get a>p
0
I'm curious about the char array t[ ] that you created. The printf("....", t); doesn't seem to use the array at all. I ran your code and didn't see it does anything with it.