Bugun if else da ohirgi dars misolani ishlaymiz
#include <iostream>
using namespace std;
int main(){
int a,b,c;
int a1,b1,c1;
int strike = 0, ball = 0;
cin >> a >> b >> c;
cin >> a1 >> b1 >> c1;
if(a == a1){
strike++;
}
if(b == c1 || c == b1){
++ball;
}
if(b == b1){
++strike;
}
if(a == c1 || c == a1){
++ball;
}
if(c == c1){
++strike;
}
if(a == b1 || b == a1){
++ball;
}
if((b == c1 && c == b1)){
++ball;
}
if(a == c1 && c == b1){
++ball;
}
if(a == b1 && b == a1){
++ball;
}
<< strike << "S" << ball << "B";
bu bizani ohirgi mavzuyimiz
keyingi darsdan boshqa mavzu otamiz
return 0;
}
For further actions, you may consider blocking this person and/or reporting abuse
Oldest comments (0)