+ 1
How to make a code which converts + to + or - to + in C
C
11 odpowiedzi
+ 5
Hello! I’m glad to help you with your question. You’re inquiring about how to write a code that finds the absolute value of a number in C. There are several ways to do this, including using the built-in abs() function. However, if you want to implement this yourself, you can use conditional expressions or bitwise operations. I’ve attached a code example that explains everything from A to Z. I hope this helps!
https://code.sololearn.com/ci3NwdO08oLi/?ref=app
+ 4
Aaryan Singh Chauhan ,
Your question and the code you shared have contradictions...what exactly your question...??
+ 4
Aaryan Singh Chauhan ,
Hope it is understandable,
https://code.sololearn.com/cL9W63YoMp72/?ref=app
+ 2
Share your code
+ 2
Aaryan Singh Chauhan ,
Modulus operator can be represented by (%) ...used to calculate remainder...
Eg:-
a=10
b=2
rem=a%b
So rem will Store the remainder value
+ 2
Where is your attempt??
Firstly, share your attempt if there is any issue in the code then we can help you. We can't give you a readymate code.
0
I would like to know how to find modulus in c
0
I mean f(x)=|x|
0
How to use it in c
0
use " abs(x) " function from stdlib.h header file.