Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int petka=0;
- int glava=0;
- int a, b, c, d;
- cin>>a>>b>>c>>d;
- if(a==0){
- glava+=1;
- }
- else{
- petka+=1;
- }
- if(b==0){
- glava+=1;
- }
- else{
- petka+=1;
- }
- if(c==0){
- glava+=1;
- }
- else{
- petka+=1;
- }
- if(d==0){
- glava+=1;
- }
- else{
- petka+=1;
- }
- if(petka>glava)
- cout<<4-petka<<endl;
- else
- cout<<4-glava<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement