Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main ()
  5. {
  6. string A[10][5],n;
  7. char b;
  8. int k,z,d;
  9. for (int i=0;i<10;i++){
  10. cout<<"Vuvedete Ime : "<< i+1 << "chovek" <<endl;
  11. cin>>A[i][0];
  12. cout<<"Vuvedete Familiq: "<< i+1 << "chovek" <<endl;
  13. cin>>A[i][1];
  14. cout<<"Vuvedete mestorojdenie: "<< i+1 << "chovek" <<endl;
  15. cin>>A[i][2];
  16. cout<<"Vuvedete godini : "<< i+1 << "chovek" <<endl;
  17. cin>>A[i][3];
  18. }
  19. do{
  20. k=0;
  21. cout << endl;
  22. cout << "vuvedete izbranoto ot vas mestonahojdenie" <<endl;
  23. cin>>n;
  24. for (int i=0;i<10;i++){
  25. if (A[i][2]==n){
  26. k=k+1;
  27. if(k==1){
  28. cout<<"Rodenite na tova naseleno mqsto sa: "<<endl;
  29. }
  30. cout<<"ime: " << A[1][0] << "familiq: " << A[i][1] << "godini : " << A[i][3]<<endl;
  31. }
  32. }
  33. if (k==0){
  34. cout << "Nqma hora rodeni v tova naseleno mqsto"<<endl;
  35. }
  36. else{
  37. cout << "Ima hora rodeni tama " << k << "chovek/a rodeni tam"<<endl;
  38. }
  39. cout <<"Iskate li da vuvedete naseleno mqsto otnovo ? Da/Ne ? : " ;
  40. cin>>b;
  41. }while (b=='y');
  42. return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement