Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "vasos.h"
- #include <stdio.h>
- int main (void)
- {
- TVaso vestatico1(10.0), vestatico2(20.0);
- TVaso *p,*p2;
- p = new TVaso(30.0);
- vestatico1.EcharLiquido(5.0);
- vestatico1.Beber(2.0);
- printf("Aun queda %lf\n",vestatico1.VerCuantoQueda());
- vestatico2.EcharLiquido(8.0);
- vestatico2.Beber(3.0);
- printf("Aun queda %lf\n",vestatico2.VerCuantoQueda());
- p->EcharLiquido(16.0);
- p->Beber(6.0);
- printf("Aun queda %lf\n",p->VerCuantoQueda());
- p2 = new TVaso(100.0);
- p2->EcharLiquido(150.0);
- p2->Beber(60.0);
- p2->EcharLiquido(10.0);
- p2->Beber(20.0);
- printf("Aun queda %lf\n",p2->VerCuantoQueda());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement