Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <cstdio>
- #include <cstring>
- struct person
- {
- char lastname[64];
- char firstname[64];
- char post[64];
- int salary;
- };
- int main() {
- const int amountOfWorkers = 3;
- person p[amountOfWorkers] = {};
- for (int i = 0; i < amountOfWorkers; i++)
- {
- printf("Enter firstname: ");
- scanf("%s", p[i].firstname);
- printf("Enter lastname: ");
- scanf("%s", p[i].lastname);
- printf("Enter post:");
- scanf("%s", p[i].post);
- printf("Enter salary:");
- scanf("%d", p[i].salary);
- }
- }
- void showData()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement