Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- using namespace std;
- struct stek {
- int id , count;
- float weight;
- stek *next=NULL;
- };
- void vvod(stek **inf)
- {
- stek *p = new stek;
- cin >> p->id >> p->count >> p->weight;
- p->next = *inf;
- *inf = p;
- }
- void edit(stek **inf)
- {//первый пункт
- stek *p = *inf;
- int idsearch;
- cin >> idsearch;
- while (p)
- {
- if (idsearch == p->id)
- {
- cin >> p->id >> p->count >> p->weight;
- return;
- }
- p = p->next;
- }
- }
- void show(stek **inf)
- {// второй пункт
- stek *p = *inf;
- while (p)
- {
- cout << p->id <<" "<< p->count <<" "<< p->weight<<" " << endl;
- p = p->next;
- }
- }
- bool task(stek **inf)
- {// третий пункт
- stek *p = *inf;
- while (p)
- {
- if (p->count == 1 && p->weight >= 30) return true;
- p = p->next;
- }
- return false;
- }
- int main()
- {
- stek *inf = NULL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement