Advertisement
luizaspan

Aula funções III

Jun 23rd, 2015
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6.     if (argc != 5)
  7.     {
  8.         printf("Uso correto: %s v N dt arquivo \n",argv[0]);
  9.         exit(1);
  10.     }
  11.  
  12.     float velocidade = (float) atof(argv[1]);
  13.     int N = (int) atoi(argv[2]);
  14.     float dt = (float) atof(argv[3]);
  15.  
  16.     // strcpy(filename,argv[4]);
  17.  
  18.     printf("Velocidade = %f \n",velocidade);
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement