victory
Well-Known Member
- تاريخ التسجيل
- 19 سبتمبر 2012
- المشاركات
- 377
- المجموعة
- أنثى
- الدفعة الدراسية
- 2012
- الكلية
- كلية تقنية المعلومات
- التخصص
- information system
هم يبون برنامح مو فنكشن عفرسؤال خفيف شوي
Write a program that prompts the user to input a string. The program then should remove all the vowels from the string and output the new string. For example, if str=”There”, then after removing all the vowels, str=”Thr”. ”.
PHP:
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string s;
cout<<"enter string :";
cin>>s;
cout<<endl;
for (int i=0;i<s.length();i++)
{
if (s[i]=='a'||s[i]=='A'||s[i]=='u'||s[i]=='U'||s[i]=='i'||s[i]=='I'||s[i]=='o'||s[i]=='O'||s[i]=='e'||s[i]=='E')
{
s.erase ( i , 1 );
}
}
cout<<s<<endl;
return 0;
}


.. انزين و ادا داخل الاري الا هي الستراكجر len-1 لييش ؟




