FranciscoSoccol

Lista 10 - Exercicio 05

Sep 8th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6.     int limite, i;
  7.     FILE *fp;
  8.     fp=fopen("multiplos7.txt","w");
  9.  
  10.     if(fp==NULL)
  11.         printf("erro ao criar arquivo!");
  12.     limite=atoi(argv[1]);
  13.     for(i=1;i<=limite;i++)
  14.         fprintf(fp,"%d\n",i*7);
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment