Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef struct{
- char element;
- float kolichestvo;
- int vqrno;
- }bokluk_t;
- float pigi(bokluk_t mani[10])
- {
- float Kolichestvo=1;
- int sum=0;
- int i;
- for (i=0; i<10; i++)
- {
- if(mani[i].vqrno=1 && mani[i].kolichestvo<1)
- {
- Kolichestvo=Kolichestvo - mani[i].kolichestvo;
- if(Kolichestvo > 0)
- {
- return mani[i].element;
- return mani[i].kolichestvo;
- return mani[i].vqrno;
- sum=sum+mani[i].kolichestvo;
- }
- }
- }
- return sum;
- }
- int main()
- {
- bokluk_t bobi[10];
- bobi[0].element='C';
- bobi[0].kolichestvo=0.1;
- bobi[0].vqrno=1;
- pigi(bobi);
- printf("%c", bobi.element);
- printf("%f", bobi.kolichestvo);
- printf("%d", bobi.vqrno);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement