-
Notifications
You must be signed in to change notification settings - Fork 1
/
String ..find_first_of
45 lines (41 loc) · 1.03 KB
/
String ..find_first_of
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//Author: Fuadul Hasan([email protected])
//BSMRSTU,Gopalganj
#include<bits/stdc++.h>
using namespace std;int tc = 1;
#define happy ios::sync_with_stdio(false);
#define coding cin.tie(0);
#define pb push_back
#define mp make_pair
#define ll long long
#define pr pair<int, int>
#define vpr vector<pr>
#define vi std::vector<int>
#define vll std::vector<ll>
#define all(n) n.begin(),n.end()
#define Test printf("Case %d: ",tc++);
#define YES printf("YES\n");
#define NO printf("NO\n");
#define Yes printf("Yes\n");
#define No printf("No\n");
const int mod = 1e9 + 7;
const ll Inf = (ll)2e18 + 5;
const int N = 2e5 + 5;
#include <iostream>
#include <string>
int solve()
{
//happy coding
string str = "PLease, replace the vowels in this sentence by asterisks.";
string::size_type found = str.find_first_of("aeiou");
while(found != std::string::npos){
str[found] = '-';
found = str.find_first_of("aeiou", found+1);
}
cout<<str<<endl;
return 0;
}
int main(){
int test = 1;
//scanf("%d", &test);
while (test--)solve();return 0;
}