Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8883011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:42:48+00:00 2026-06-14T20:42:48+00:00

Write a program that deletes vowels ( String , NoVowelsString ) that deletes all

  • 0

Write a program that deletes vowels (String, NoVowelsString) that deletes all vowels from a given string.

So far I’ve got the condition vowel(X):- member(X,[a,e,i,o,u]). Then I thought of the one that deletes all the elements from the other list:

delete2([],L1,L1).
delete2([H|T],L1,L3) :-
   delete2(H,L1,R2),
   delete2(T,R2,L3).

So having these two I thought that I could put a condition to those elements being deleted that they have to be a member of [a,e,i,o,u]. Though I still haven’t got anywhere.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:42:49+00:00Added an answer on June 14, 2026 at 8:42 pm

    Here is the code

    deleteV([H|T],R):-member(H,[a,e,i,o,u]),deleteV(T,R),!.
    deleteV([H|T],[H|R]):-deleteV(T,R),!.
    deleteV([],[]).
    

    What it does?
    First it question itself?It’s the head a vowel
    Yes->We ignore it.
    No->We need it.
    If it finds an empty list, it constructs the result list, and when returning from backtracking it appends the consonats in front.
    This code was tested in SWIProlog.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a program that deletes any occurrence of a member in
Is it possible to write a program in C that upon execution deletes itself
I want to write a program that automatically downloads all the csv files on
I want to write a program that would take a string, let's say Fox
I want to write a program that deletes duplicate iTunes music files. One approach
I am trying to write a program that deletes frames of a video that
I have to write program that counts how many different letters are in string.
I'm willing to write program that after 5 sec shows text that was hidden
I need to write a program that prints 0.(03) for input 1 and 33.
I need to write a program that takes input line at a time and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.