Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. bool shoda(char* a,char* b)
  2. {
  3. for(int i=0; i < 6; i++)
  4. {
  5. if (a[i] != b[i])
  6. {
  7. return (false);
  8.  
  9. }
  10.  
  11.  
  12. }
  13.  
  14. return (true);
  15. }
  16.  
  17.  
  18.  
  19.  
  20. int main()
  21.  
  22. { /*float y,x,v;
  23. cin >> y >> x >> v;
  24. cout <<"Aritmeticy prumer je: " <<prumer(y,x,v) << endl;
  25. */
  26.  
  27. /*float p1[3] = {5,4,3};
  28. float p2[4] = {5,2,3,4};
  29. cout << prumer(p1,3) << endl;
  30. cout << prumer(p2,4) << endl;
  31. */
  32.  
  33. char p1[6];
  34. char p2[6];
  35. cin >> p1 >> p2;
  36. if(shoda(p1,p2))
  37. {
  38. cout <<"shoduje se" << endl;
  39. system("pause");
  40. }
  41. else{
  42. cout << "Neshoduje se" << endl;
  43.  
  44.  
  45.  
  46. system("pause");
  47. return 0;
  48. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement