SHARE
TWEET

Untitled

a guest Apr 22nd, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<iostream>
  2. #include<cstring>
  3. #include<stdio.h>
  4. #include<string.h>
  5.  
  6.  
  7. using namespace std;
  8.  
  9.  
  10. struct tabela {
  11.  
  12.  
  13. string marca;
  14. float preco;
  15. int ano;
  16.  
  17. };
  18.  
  19. struct tabela tab_info[5];
  20.  
  21.  
  22. int main(){
  23.  
  24. for(int i = 0; i < 5; i++){
  25. cout<<"Informe o registro do carro\n";
  26.  
  27. cout<<"marca do carro: ";
  28. getline(cin, tab_info[i].marca);
  29. cout<<"preco do carro: ";
  30. cin>>tab_info[i].preco;
  31. cout<<"ano do carro: ";
  32. cin>>tab_info[i].ano;
  33.  
  34. }
  35.  
  36.  
  37. for(int i = 0; i < 5; i++){
  38.  
  39. cout<<tab_info[i].marca<<endl;
  40. cout<<tab_info[i].ano<<endl;
  41. cout<<tab_info[i].preco<<endl;
  42.  
  43.  
  44.  
  45. }
  46.  
  47. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top