Answers for "Andrew and COVID"

0

Andrew and COVID

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;


int main() {
    /* Enter your code here. Read input from STDIN. Print output to STDOUT */   
    string s;
    getline(cin,s);
    
    unsigned i;
    int counter=0;
    for(i=0;i<s.length();i++){
    	if(s[i]=='c'||s[i]=='o'||s[i]=='v'||s[i]=='i'||s[i]=='d'){
    		counter++;
		}
	}
	cout<<counter/5<<endl;
    
    return 0;
}
Posted by: Guest on July-10-2020

Browse Popular Code Answers by Language