#include <stdio.h>
#include <math.h>
int main() {
// Define the range of x values
float x_start = 0.0;
float x_end = 1.0;
float step = 0.1;
// Print the header of the table
// Calculate and print the values for each x
for (float x = x_start; x <= x_end; x += step) {
// Calculate the cosine of x
// Print the x and cos(x) values
printf("%.2f\t%.4f\n", x
, cosx
); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+CgppbnQgbWFpbigpIHsKICAvLyBEZWZpbmUgdGhlIHJhbmdlIG9mIHggdmFsdWVzCiAgZmxvYXQgeF9zdGFydCA9IDAuMDsKICBmbG9hdCB4X2VuZCA9IDEuMDsKICBmbG9hdCBzdGVwID0gMC4xOwoKICAvLyBQcmludCB0aGUgaGVhZGVyIG9mIHRoZSB0YWJsZQogIHByaW50ZigieFx0Y29zKHgpXG4iKTsKICBwcmludGYoIi0tLS1cdC0tLS1cbiIpOwoKICAvLyBDYWxjdWxhdGUgYW5kIHByaW50IHRoZSB2YWx1ZXMgZm9yIGVhY2ggeAogIGZvciAoZmxvYXQgeCA9IHhfc3RhcnQ7IHggPD0geF9lbmQ7IHggKz0gc3RlcCkgewogICAgLy8gQ2FsY3VsYXRlIHRoZSBjb3NpbmUgb2YgeAogICAgZmxvYXQgY29zeCA9IGNvcyh4KTsKCiAgICAvLyBQcmludCB0aGUgeCBhbmQgY29zKHgpIHZhbHVlcwogICAgcHJpbnRmKCIlLjJmXHQlLjRmXG4iLCB4LCBjb3N4KTsKICB9CgogIHJldHVybiAwOwp9Cg==