Problem 36

11 comments on “Problem 36”


  • Akash

    JAVA CODE

    public static void main (String[] args) throws java.lang.Exception
    {
    // your code goes here
    Scanner sc = new Scanner(System.in);
    String s = sc.nextLine();
    String res = “”;
    for(int i = 0; i < s.length(); i++){
    char c = s.charAt(i);
    if(c!='a'&& c!='A' && c!='e' && c!='E' && c!='i' && c!='I' && c!='o' && c!='O'&& c !='u' && c!='U'){
    res+=c;
    }
    }
    System.out.println(res);
    }


  • sunny

    python :
    def fun(x):
    s=[]
    t=[]
    for i in range(0,len(x)):
    if (x[i]==’a’ or x[i]==’e’ or x[i]==’i’ or x[i] == ‘o’ or x[i]==’u’):
    s.append(x[i])
    else:
    t.append(x[i])
    print(”.join(t))
    x=list(input())
    fun(x)


  • Varun

    #Python
    s=”AreyouamaN”
    s1=”
    v=[‘a’,’e’,’i’,’o’,’u’]
    for i in s:
    if i.lower() in v:
    continue
    else:
    s1+=i
    print(s1)


  • shushank

    #Python Programming

    l=[‘a’,’e’,’i’,’o’,’u’,’A’,’E’,’I’,’O’,’U’]
    s=str(input())
    s2=””
    for i in range(len(s)):
    if s[i] in l:
    pass
    else:
    s2=s2+s[i]
    print(s2)


  • amit

    #include
    #include
    int main()
    {
    char arr[1000];
    int n,count=0;;
    scanf(“%[^\n]%*c”,arr);
    n=strlen(arr);
    for(int i=0;i<n;i++)
    {
    if(arr[i]=='a' || arr[i]=='e' || arr[i]=='i' || arr[i]=='o' || arr[i]=='u')
    {
    for(int j=i;j<n;j++){
    arr[j]=arr[j+1];
    }
    n–;
    }
    }
    // for(int i=0;i<n;i++)
    printf("%s",arr);
    return 0;
    }


  • Raman

    // Online C compiler to run C program online
    #include
    #include

    int main() {

    char a[100],b[100];
    int i,j=0,p,count=0;
    scanf(“%s”,a);
    int n=strlen(a);

    for(i=0;i<n;i++){
    p=0;

    if(a[i]=='a' || a[i]=='A' ||a[i]=='e' || a[i]=='E' ||a[i]=='i' || a[i]=='I' ||a[i]=='o' || a[i]=='O' ||a[i]=='u' || a[i]=='U' ){

    p=1;
    }
    if(p==0){
    b[j]=a[i];
    j++;
    count++;
    }
    }
    printf("%s",b);

    return 0;
    }


  • Rahul

    public class Main
    {
    public static void main (String[]args)
    {
    String string = “hello, How are you?”;
    string = string.replaceAll(“[aeiou]”,””);
    System.out.println(string);
    }
    }


  • Pogakula

    #python3
    def remvow(s):
    v=’aeiouAEIOU’
    final=”
    for i in s:
    if i not in v:
    final+=i
    else:
    continue
    return final
    st=str(input(‘enter the string:\t’))
    print(remvow(st))


  • rohan

    #include
    #include
    int main()
    {
    int i,j,len;
    char word[20];
    gets(word);
    len=strlen(word);
    for(i=0;i<=len;++i)
    {
    if(word[i]=='a' || word[i]=='e' || word[i]=='i'|| word[i]=='o' || word[i]=='u' || word[i]=='A' || word[i]=='E' || word[i]=='I' || word[i]=='O' || word[i]=='U')
    {
    for(j=i;j<=len;++j)
    {
    word[j]=word[j+1];
    }
    –len;
    –i;
    }
    }
    for(i=0;i<=len;++i)
    {
    printf("%c",word[i]);
    }
    return 0;
    }


  • Chandra Chandu

    #include
    using namespace std;
    int main()
    {
    int i,j,n;
    string s1;
    char s[10000];
    cin>>s;
    for(i=0;s[i]!=’\0′;i++)
    {
    if (s[i] == ‘a’ || s[i] == ‘A’ || s[i] == ‘e’ || s[i] == ‘E’ || s[i] == ‘i’ || s[i] == ‘I’ || s[i] ==’o’ || s[i]==’O’ || s[i] == ‘u’ || s[i] == ‘U’)
    continue;
    else
    s1=s1+s[i];
    }
    cout<<s1;
    }


    • VIVEK KUMAR

      #Python
      word=input(“Enter the sentence”)
      vowels=’aAeEioOuU’

      for i in word:
      if i in vowels:
      word=word.replace(i,”)
      print(word)