Advertisement
DmitryPythonDevelop

lab7

Oct 19th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. struct str {         // Структурное представление
  2.     char name [21];  // строки в файле:
  3.     int product[3];  // Имя, продуктивность за три года.
  4. };
  5.  
  6. struct str temp;
  7.  
  8. scanf("%s", temp.name);
  9.  
  10. for(i=0; i<3; i++){
  11.     scanf("%d", &temp.product[i]);
  12. }
  13.  
  14. printf("%-20s%-6d%-6d%-6d\n", temp.name, temp.product[0], temp.product[1], temp.product[2]); // в оригинале  кода fprintf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement