Guest User

Untitled

a guest
May 24th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. void intr() {
  2. FILE *f=fopen("num4in.txt","w");
  3. int *p1;
  4. printf("Cite numere doriti sa introduceti?");
  5. scanf("%d",&n);
  6.  
  7. for(int i=0;i<n;i++)
  8. {printf("\nNumarul %d :",i+1); scanf("%d",p1);
  9. fprintf(f,"%3d",*p1);
  10.  
  11. }
  12. fclose(f);
  13.  
  14. void afis(){
  15. int *p1;
  16. FILE *f=fopen("num4in.txt","rb");
  17. while(!feof(f)){
  18. fscanf(f,"%3d",p1);
  19. printf("|%d",*p1);
  20. }
  21. getch();
  22. fclose(f);
  23. }
Add Comment
Please, Sign In to add comment