Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Prekes {
- char pavadinimas[50];
- char kodas[50];
- float kaina;
- };
- static float sudetis(struct Prekes p, struct Prekes p1){
- float sum;
- sum =p.kaina+p1.kaina;
- return sum;
- }
- int main(){
- struct Prekes preke1;
- struct Prekes preke2;
- strcpy( preke1.pavadinimas, "Telecom Billing");
- strcpy( preke1.kodas, "Zara Ali");
- preke1.kaina = 20;
- strcpy( preke2.pavadinimas, "Telecom Billing");
- strcpy( preke2.kodas, "Zara Ali");
- preke1.kaina = 30;
- printf(sudetis(preke1, preke2));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement