Advertisement
Guest User

FIRST

a guest
Oct 24th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5. string hai[5][5];
  6. int count=0;
  7. for(int i=0;i<5;i++)
  8. for(int j=0;j<5;j++)
  9. cin >> hai[i][j];
  10. for(int i=0;i<5;i++)
  11. for(int j=0;j<5;j++){
  12. if(hai[i][j]=="o"){count+=1;
  13. cout << "o ada di baris ke-" << i+1 << " dan kolom ke-" << j+1;
  14. cout << endl;}
  15. }
  16. cout << endl << "Jumlah o adalah " << count << endl;
  17. system("pause");
  18. }
  19.  
  20.  
  21. #include <iostream>
  22. #include <math.h>
  23. using namespace std;
  24.  
  25. int main(){
  26. int n;
  27. string a;
  28. cin >> n >> a;
  29. for(int i = 0;i<3;i++){
  30. if(i!=1){
  31. for(int i=0;i<n+4;i++) cout << "#";
  32. }else{
  33. cout << "# " << a << " #";
  34. }
  35. cout << endl;
  36. }
  37. }
  38.  
  39.  
  40.  
  41. #include <iostream>
  42. #include <math.h>
  43. using namespace std;
  44.  
  45. int main(){
  46. int n;
  47. string a;
  48. cin >> n >> a;
  49. for(int i=0;i<n+4;i++){
  50. cout << "#";
  51. }
  52. cout << endl;
  53. cout << "# " << a << " #" << endl;
  54. for(int i=0;i<n+4;i++){
  55. cout << "#";
  56. }
  57. cout << endl;
  58. }
  59.  
  60.  
  61.  
  62. #include <iostream>
  63. #include <math.h>
  64. using namespace std;
  65.  
  66. int main(){
  67. int a,b,c;
  68. cin >> a >> b;
  69. c = a/3600;
  70. cout << c*b;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement