#hi i want to know if this program is correct
7 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
!code
How to Format Code on Discord
Markup
```cpp
int main() {}
```
Result
int main() {} ```
Note: Back-tick (`) not quotes (')
Also, "correct" is a matter of what do you want the code to do
!f
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
float myfunc(float x) {
return pow(x, 4) - 24 * log(x) + 3 * pow(sin(x), 2);
}
int main() {
float x, result;
printf("Enter any number: ");
scanf("%d", &x);
result = myfunc(x);
printf("Result=%f", result);
return 0;
}