gr4viton

bpca1 asd a sd asd

Feb 25th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.69 KB | None | 0 0
  1. //#define _CRT_SECURE_NO_WARNINGS
  2.  
  3. #include <stdio.h>
  4.  
  5.  
  6. int main(int argc, char *argv[])
  7. {       // argc = argument count | argv = argument value
  8.     float a;
  9.     float b;
  10.     float c;
  11.     float d;
  12.  
  13.     printf("argc=%d\n", argc);
  14.     if (argc == 2)
  15.     {
  16.         // converts the string of chars from argv into two int vars
  17.         printf("argv[1] = \n%s\n", argv[1]);
  18.         sscanf_s(argv[1], "%f;%f;%f;%f", &a, &b, &c, &d);
  19.         printf("%f  %f  %f  %f\n", a, b, c, d);
  20.     }
  21.     else
  22.     {
  23.         // outputs into error stream
  24.         fprintf(stderr, "chyba..");
  25.     }
  26.  
  27.     // make the output right
  28.     /*
  29.     fsdM(a, b);
  30.     fsdE(a, b);
  31.     fsd(a, b);
  32.     */
  33.     int endi = 1;
  34.     while(endi!=0)
  35.     {
  36.         scanf("%i", endi);
  37.     }
  38.     return 0;
  39. }
  40.  
  41.  
  42. // 104324283 -ukPN
Advertisement
Add Comment
Please, Sign In to add comment