Codeforces 110A Nearly Lucky Number Solution in CPP

Question link:

Codeforces 110A Nearly Lucky Number solution in CPP

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string a;
    int c=0,z=0;

    cin>>a;
    for(int i=0;i<a.size();i++) {
        if(a[i]=='4'||a[i]=='7')//Codeforces 110A Nearly Lucky Number solution in CPP
            c++;

}
if(c==4||c==7)
  cout<<"YES"<<endl;
  else
      cout<<"NO"<<endl;
}


Codeforces 734A.Anton and Danik solution in Cpp

2 thoughts on “Codeforces 110A Nearly Lucky Number Solution in CPP”

  1. Hi exceptional blog! Does running a blog such as this require a great deal
    of work? I have very little knowledge of
    programming however I had been hoping to start my own blog in the near future.
    Anyway, should you have any recommendations or techniques for
    new blog owners please share. I understand this is off topic
    nevertheless I simply had to ask. Thanks a lot!

    Reply

Leave a Comment