fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. return 0;
  7. }
Success #stdin #stdout 0s 5280KB
stdin
#include <stdio.h>
#include <math.h>

int main() {
double x, y;
x=-1.5;
printf ("/n| x | y |/n| --- | --- |/n");
while (x<=1.5) {
if (x<-0.5) y = x + sqrt(abs(cos(x)));
if (x>=-0.5)&&(x<=1) y = x + 1;
if (x>1) y = 1 - pow(x, 2);
printf ("| %f | %f |/n", x, y);
x = x + 0.2;
}
}
stdout
Standard output is empty