Skip to content

MyUstaadG

Learn to Serve

  • Computer Science
    • Software
    • Computer Tips
    • Coding
      • Conditional Structures Exercises
      • Loops Exercises
      • Arrays Exercises
      • Python Exercises
    • Microsoft Office
      • MS Excel
      • MS Word
  • Videos
    • Funny Videos
    • Health and Fitness Videos
    • PUBG Videos
    • Technology Videos
  • News
  • Funny
  • Memes
  • Playwright Tutorials
  • Tutorials
  • Toggle search form

Write a program that inputs data into a string and searches the ‘vowel’ characters from the string and displays on the screen.

Posted on October 26, 2021 By myustaadg.com
Spread the love

Write a program that inputs data into a string and searches the ‘vowel’ characters from the string and displays on the screen.

So let’s Write Code:

Introduction to C++ Programming | Download and Install Dev C++ Compiler

Code:

Write a program that inputs data into a string and searches the ‘vowel’ characters from the string and displays on the screen.

#include<iostream>
using namespace std;
main()
{
char str[20], n;
cout<<"Enter a string less than 20 letters ? ";
cin>>str;
cout<<"\n Vowel characters from the string are:"<<endl;
for(n = 0; str[n]!='\0'; n++)
{
if(str[n] == 'a' || str[n] == 'A' || str[n] == 'e' || str[n] == 'E' || str[n] == 'i' || str[n] == 'I'
|| str[n] == 'o' || str[n] == 'O' || str[n] == 'u' || str[n] == 'U')
cout<<str[n]<<endl;
}
}

Hope You will learn Something. Happy Coding.

Visit my YouTube Channel as Well😇 https://www.youtube.com/watch?v=JuIHQ9cLSEw&list=PLbIhkHxfUIItTdcyCb34uRIrPJbXBndIl&index=4

Click on the below Links for more Programming Exercises:

Conditional Structure Exercises: 👉https://myustaadg.com/category/programming-exercises/conditional-structures-exercises/

Array Exercises: 👉https://myustaadg.com/category/programming-exercises/arrays-exercises/

Arrays Exercises, Programming Exercises Tags:array declaration in c++, Array Exercises, Array exercises in C++, array programming, Arrays, arrays codes, Arrays exercises, Arrays in C++, Arrays in C++ Programming with examples, Arrays in Programming, Arrays with example, C Program Count Number Of Vowels & Consonants In A String, C programming exercises: String, c++ arrays declaration and initialization, C++ Arrays with examples, C++ Program to Check Whether a Character is Vowel or Not, C++ Program to Find the Number of Vowels, C++ Program to Find the Number of Vowels and Consonants, C++ strings: taking string input, Consonants, Count and display vowels in a string, Creating and Using Arrays, how do you initialize an array in c++, Program that prompts the user to enter a string, Simple arrays code, Write a c++ program that finds the number of vowels, Write a program that inputs data into a string and searches the ‘vowel’ characters from the string and displays on the screen.

Post navigation

Previous Post: Write a program that sorts one-dimensional array of 5 elements in ascending order using insertion sort method.
Next Post: Write a program that initializes values in two tables A and B. It adds tables A and B and stores result into table C. It also displays the values of three tables in tabular form on the screen.

More Related Articles

Write a program in C++ that inputs data into an array. It inputs a value from the user and searches this value in the array using sequential search. Arrays Exercises
Write a Program to Build a Simple Calculator in C# Write a Program to Make a Simple Calculator in C# Programming Language | Solved Programming Exercises Programming Exercises
Write a program to enter 10 integers in a single-dimensional array and then print out the array in descending order. Arrays Exercises
Write a program that sorts one-dimensional array of 5 elements in ascending order using insertion sort method. Arrays Exercises
Write a program that sorts one-dimensional array’s values into descending order using the bubble sort method. Arrays Exercises
Write a Program in C++ to Calculate Your Age in Years Months and Days using Date of Birth Programming Exercises

Copyright © 2022 MyUstaadG.

Powered by PressBook Blog WordPress theme