Hello. There is a task:
Given a list of at least 8 workers, enter the name, count. years of work experience, how many until retirement. Bring anyone left less than 15 years to retirement.
I wrote this code:
#include <stdio.h> struct raboczii { char imja[20]; char kolvolet[100]; char staz[50]; } raboczii; void main() { char str[30]; int p; raboczii working[8] = { { "Storoz Tolja", "45", 20 }, { "Teteruk Dima", "46", 25 }, { "Chirva Ura", "47", 29 }, { "Ivanov Vasja", "62", 32 }, { "Pupkin Aleksei", "65", 35 }, { "Bil Geits", "22", 2 }, { "Ivan Ivanov", "19", 1 }, { "Petrovicz Petja", "51", 21 }, }; for (p = 0; p < sizeof(working) / sizeof(working[0]); p++) { if (working[[p].kol - vo let > 60) printf(" %s %s %d\n", working[p].imja, working[p].kolvolet working[p].staz, ); } getch; }
Writes an error in raboczii working[8] =
Tell me what's wrong?