I have written the code below and I don't think there are any syntax errors, but it doesn't print out anything.
I'm sure it won't look nice even if it works, but for now, I just need to make it work.Code:#include <stdio.h> #include <math.h> int main() { int x = 0, a; while(x<=1) { x = x + 0.0175; a = sin(x); printf("%i", a); a = 1/a-20; for ( ; a>0; a--) { printf("*"); } printf("\n"); } return 0; }
I am required to get a result similar to this: