MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

CPP/Problems/49a.cpp:3–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include<bits/stdc++.h>
2using namespace std;
3int main(){
4
5string s;
6getline(cin,s);
7
8int l=s.length();
9int f=0;
10for (int i=l;i=0;i--){
11if (s[i]!=' ' || s[i]!='?'){
12 if (s[i]=='A' || s[i]=='E' || s[i]=='I' || s[i]=='O' || s[i]=='U' || s[i]=='Y' || s[i]=='a' || s[i]=='e' || s[i]=='i' || s[i]=='o' || s[i]=='u' || s[i]=='y' ){
13 f=1;
14 break;
15
16 }
17 else
18 f=0;}}
19
20 if (f==1){
21 cout<<"YES"<<endl;
22 }
23 else
24 cout<<"NO"<<endl;
25
26
27 return 0;
28}

Callers

nothing calls this directly

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected