Advertisement
zezepistola

Untitled

Oct 15th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <conio.h>
  4.  
  5. using namespace std;
  6.  
  7. class produto_preco{
  8.  
  9. public:
  10.  
  11. std:: string nome;
  12. float preco;
  13.  
  14. };
  15.  
  16. int main ()
  17. {
  18.  
  19. produto_preco p;
  20. p.nome = "arroz";
  21. p.preco = 5.90;
  22.  
  23. std::cout << "nome:" <<p.nome << std::endl;
  24. std::cout <<"preco:" <<p.preco << std::endl;
  25.  
  26.  
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement