01. C programming language

As seen before C programming language is:

C program structure

C program example

   1 #include <stdio.h>
   2 #define START 100500
   3 
   4 int num=START;
   5 float flt=2.718281828459045;
   6 
   7 int main(int argc, char *argv[]) {
   8         int i;
   9         register int j;
  10 
  11         printf("Enter a cardinal: ");
  12         scanf("%d", &num);
  13 
  14         flt = 0.0;
  15         for(i=1; i<num; i++)
  16             for(j=1; j<i; j++)
  17                 flt += 1./j;
  18 
  19         printf("Result is %f\n", flt);
  20         return 0;
  21 }

H/W

HSE/ProgrammingOS/01_CProgrammingLanguage (последним исправлял пользователь FrBrGeorge 2020-03-01 11:30:32)