Exemple #1
0
int main(int argc, char** argv) {
    int x1 = add_together(10, 18);
    if (x1 > 10 && x1 < 100) {
        puts("x is greater than ten and less than one hundred!");
    } else {
        puts("x is either less than eleven or greater than ninety-nine!");
    }
    int i = 5;
    while (i > 0) {
        puts("Hello, World!");
        i = i-1;
    }
    for (int i = 0; i < 5; i++) {
        puts("Hello, for-loop!");
    }
    lewp(10);

    return 0;
}
#include <stdio.h>
#include <math.h>

int main(int argc, char** argv) {
  puts("Hello, world!");

  int add_together(int x, int y) {
    int result = x + y;
    return result;
  }

  int added = add_together(10, 18);
  printf("%d\n", added);

  typedef struct {
    float x;
    float y;
  } point;

  point p;
  p.x = 0.1;
  p.y = 10.0;

  float length = sqrt(p.x * p.x + p.y * p.y);

  printf("%.6f\n", length);

  int x = 5;

  if(x > 10 && x < 100) {
    puts("x is greater than 10 and less than 100!");