#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
int i;
char a[100],b[100],c[100];
scanf("%s",a);
scanf("%s",b);
scanf("%s",c);
for(i=0;a[i]!='\0';i++)
{
if(a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='A'||a[i]=='E'||a[i]=='I'||a[i]=='O'||a[i]=='U')
a[i]='*';
}
for(i=0;b[i]!='\0';i++)
{
if((b[i]>='a'&&b[i]<='z') || (b[i]>='A'&&b[i]<='Z'))
if(!(b[i]=='a'||b[i]=='e'||b[i]=='i'||b[i]=='o'||b[i]=='u'||b[i]=='A'||b[i]=='E'||b[i]=='I'||b[i]=='O'||b[i]=='U'))
b[i]='@';
}
for(i=0;c[i]!='\0';i++)
{
if(c[i]>='a'&&c[i]<='z')
c[i]=c[i]-32;
}
printf("%s%s%s",a,b,c);
return 0;
}
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
int i;
char a[100],b[100],c[100];
cin >> a;
cin >> b;
cin >> c;
for(i=0;a[i]!='\0';i++)
{
if(a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='A'||a[i]=='E'||a[i]=='I'||a[i]=='O'||a[i]=='U')
a[i]='*';
}
for(i=0;b[i]!='\0';i++)
{
if((b[i]>='a'&&b[i]<='z') || (b[i]>='A'&&b[i]<='Z'))
if(!(b[i]=='a'||b[i]=='e'||b[i]=='i'||b[i]=='o'||b[i]=='u'||b[i]=='A'||b[i]=='E'||b[i]=='I'||b[i]=='O'||b[i]=='U'))
b[i]='@';
}
for(i=0;c[i]!='\0';i++)
{
if(c[i]>='a'&&c[i]<='z')
c[i]=c[i]-32;
}
cout << a << b<< c;
return 0;
}
python code using regular expression
import re
a = input()
b = input()
c = input()
print((re.sub(‘[aeiouAEIOU]’,’*’,a))+(re.sub(‘[^aeiou0-9]’,’@’,b))+(c.upper()))
Python Code:
a = str(input())
b = str(input())
c = str(input())
v = [‘a’,’e’,’i’,’o’,’u’]
con = [‘b’,’c’,’d’,’f’,’g’,’h’,’j’,’k’,’l’,’m’,’n’,’p’,’q’,’r’,’s’,’t’,’v’,’w’,’x’,’y’,’z’]
for i in a:
if i in v:
x = a.replace(i,’*’)
for i in b:
if i in con:
y = b.replace(i,’@’)
else:
y = b
z = c.upper()
print(x+y+z)
a = str(input())
b = str(input())
c = str(input())
x, y, z = 0, 0, 0
vowels = [“a”, “e”, “i”, “o”, “u”]
consonents = [“b”, “d”, “f”, “g”, “h”, “j”, “k”, “l”, “m”, “n”, “p”, “q”, “r”, “s”, “t”, “v”, “w”, “x”, “y”, “z”]
for i in a:
if i in vowels:
x = a.replace(i, “*”)
for i in b:
if i in consonents:
y = b.replace(i, “@”)
else:
y = b
z = c.upper()
print(x+y+z)
thanks for the code, but you forgot to intialize x, y, z to “0”, now it works.
w1 = input()
w2 = input()
w3 = input()
vowels = [“a”, “e”, “i”, “o”, “u”]
nums = [‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’, ‘0’]
w1 = [item for item in w1]
for i in range(len(w1)):
if w1[i] in vowels:
w1[i]=”*”
w1 = ”.join([str(elem) for elem in w1])
w2 = [item for item in w2]
for i in range(len(w2)):
if w2[i] not in vowels and w2[i] not in nums:
w2[i]=”@”
w2 = ”.join([str(i) for i in w2])
w3 = w3.upper()
print(w1+w2+w3)
a = input()
b = input()
c = input()
vowels = [‘A’, ‘E’,’I’,’O’,’U’]
for char in a:
if char.upper() in vowels:
a = a.replace(char, ‘%’)
for char in b:
if ord(char.upper()) > 65 and ord(char.upper()) < 91 and char.upper() not in vowels:
b = b.replace(char, '#')
c = c.upper()
print(a+b+c)
import re
a = input()
b = input()
c = input()
a = re.sub(r”([aeiouAEIOU])”,’%’,a)
b = re.sub(r”([b-df-hj-np-tv-zB-DF-hJ-NP-TV-Z])”,’#’,b)
c = c.upper()
print(a+b+c)
See the magic of python:
import re
a = input()
b = input()
c = input()
a = re.sub(r”([aeiouAEIOU])”,’%’,a)
b = re.sub(r”([b-df-hj-np-tv-zB-DF-hJ-NP-TV-Z])”,’#’,b)
c = c.upper()
print(a+b+c)
word1 = input(“”)
word2 = input(“”)
word3 = input(“”)
vowels = [“a”, “e”, “i”, “o”, “u”]
for i in word1:
if i in vowels:
word1 = word1.replace(i, “*”)
for i in word2:
if i not in vowels:
word2 = word2.replace(i, “@”)
print(word1+word2+word3.upper())
a=str(input())
b=str(input())
c=str(input())
vowel={‘a’,’e’,’o’,’u’,’i’,’A’,’E’,’O’,’U’,’I’}
digit={‘0′,’1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′}
for x in a:
if x in vowel:
a=a.replace(x,’*’)
for y in b:
if(y not in vowel and y not in digit):
b=b.replace(y,’#’)
c=c.upper()
print(a+b+c)
w1=[x for x in input().lower()]
w2=[x for x in input().lower()]
w3=input().lower()
vowwels=[‘a’,’e’,’i’,’o’,’u’]
for i in range(0,len(w1)):
if w1[i] in vowwels:
w1[i]=”*”
s1=””.join(w1)
for i in range(0,len(w2)):
if w2[i] not in vowwels and (w2[i].isdigit==False):
w2[i]=”@”
s2=””.join(w2)
s3=w3.upper()
print(s1+s2+s3)
import string
word1=input()
word2=input()
word3=input()
vowel=[“a”,”e”,”i”,”o”,”u”]
alphabet=[“b”,”c”,”d”,”f”,”g”,”h”,”j”,”k”,”l”,”m”,”n”,”p”,”q”,”r”,”s”,”t”,”v”,”w”,”x”,”y”,”z”]
alphabet_string = string.ascii_lowercase
alphabet_list=list(alphabet_string)
for i in word1.lower():
if i in vowel:
word1=word1.replace(i,”%”)
for j in word2.lower():
if j in alphabet:
word2=word2.replace(j,”#”)
word3=word3.upper()
result=word1+word2+word3
print(result)
w1 = input()
w2 = input()
w3 = input()
vowel_dic = {‘a’, ‘e’, ‘i’, ‘o’, ‘u’}
for char in w1:
if char in vowel_dic:
vowel_dic.remove(char)
w1 = w1.replace(char, ‘*’)
for char in w2:
if char.isalpha() and char not in vowel_dic:
w2 = w2.replace(char, ‘@’)
w3 = w3.upper()
print(w1+w2+w3)
EASY c++ code
#include
using namespace std;
int main()
{
string a,b,c; cin>>a>>b>>c;
for(int i=0;i<a.size();i++)
{
if(a[i]=='a' || a[i]=='e' || a[i]=='i' || a[i]=='o' || a[i]=='u')a[i]='%';
}
for(int i=0;i=97 && b[i]<=122))b[i]='#';
}
for(int i=0;i<c.size();i++)c[i]-=32;
cout<<a<<b<<c;
}
#include got erased rectify that