





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Three C++ programs for printing different patterns using recursion and for counting the number of vowels in a given string. The first two programs, PrintPatternA and PrintPatternB, print star patterns of given size using recursion. The third program, countvowels, counts the number of vowels in a given string using recursion. The SumOfSquares program, which is not included in the document, calculates the sum of squares of numbers up to a given number.
Typology: Assignments
1 / 9
This page cannot be seen from the preview
Don't miss anything!






#include
cout << endl; } } } int main() { int num; cout << "Enter the number of lines to print this pattern "<<endl; cin >> num; PrintPatternA(num); return 0;
int main() { int num; cout<<"enter limit to print staric pattern"<<endl; cin>>num; PrintPatternB(1, num); return 0;
#include
#include
len--; countvowels(len,s,count); } } int main() { string str; cout<<"enter astring"<<endl; cin>>str; int len=str.length(); countvowels(len,str,0); //cout<<"number of vowels in the string are "<<count<<endl; return 0; }
#include