Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- struct marshrut {
- char marsh1[60], marsh2[60],num[3];};
- void main () {
- const int n=8;
- char x[500];
- int i=0;
- marshrut ma[n];
- FILE *f=fopen("input.txt","r");
- while (fgets(x,500,f)!=0){
- sscanf (x, "%s %s %s",ma[i].marsh1,ma[i].marsh2,ma[i].num);
- i++;
- }
- for (i=0;i<n;i++)
- cout << ma[i].marsh1 << " " << ma[i].marsh2<< " " << ma[i].num <<"\n";
- }
Add Comment
Please, Sign In to add comment