Help me please !! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Help me please !!

Where is the error ? https://code.sololearn.com/cem7bTJplvpR/?ref=app

7th Oct 2018, 5:39 PM
Agnese Ghisolfo
Agnese Ghisolfo - avatar
3 Answers
+ 13
Yes as Ina said use '==' and not '=' to test for equality. Otherwise you are assigning the value to the variable. Also better to use 'else if' and 'else' after the initial 'if'. But it looks like you're using a very crude way to calculate the arcsine (inverse sine) of a value by testing for just a set of discrete values. Maybe look at including math.h or related library/header and use its related functions (e.g. asin). https://www.tutorialspoint.com/c_standard_library/c_function_asin.htm
8th Oct 2018, 6:54 AM
Sonic
Sonic - avatar
+ 4
You have to use check equality by == operator not assigned a value in if statement
9th Oct 2018, 10:34 AM
Rahul
Rahul - avatar
+ 2
if ( a == not if ( a =
8th Oct 2018, 4:38 PM
Foued
Foued - avatar