Ektb Code - اكتب كود
هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.

اذهب الى الأسفل
ibrahim sherif mohamed
ibrahim sherif mohamed
مبرمج جديد
مبرمج جديد
Posts : 9
Points : 1371
Reputation : 0
Join date : 11/08/2020

[تم الحل]unknown reason of error c ++ Empty [تم الحل]unknown reason of error c ++

الجمعة أغسطس 14, 2020 11:30 am
الكود:
#include <iostream>
#include <cctype>
#include <string>

using namespace std;

int lowerVowel (string str);

int main ()
{
    string letters;

    cout << "enter a string ";
    cin >> letters;
    cout << "the number of lower case vowels are " << lowerVowel(letters);

    return 0;
}

int lowerVowel (string str)
{
    int lowerVowelCount = 0;

    for (int counter = 1; counter <= str.length(); counter ++)
    {
         if (islower(str.at(counter)) == true)
            switch (str.at(counter))
            {
                case 'a': case 'e': case 'i': case'o': case'u':
                lowerVowelCount ++;
                break;
                default:
                    break;
            }
    }
    return lowerVowelCount;
}
Ektb Code
Ektb Code

Posts : 54
Points : 1615
Reputation : 11
Join date : 05/05/2020
https://ektbcode.ahlamontada.com

[تم الحل]unknown reason of error c ++ Empty رد: [تم الحل]unknown reason of error c ++

الأحد أغسطس 16, 2020 11:32 am
ممكن screenshot من الerror؟
ibrahim sherif mohamed
ibrahim sherif mohamed
مبرمج جديد
مبرمج جديد
Posts : 9
Points : 1371
Reputation : 0
Join date : 11/08/2020

[تم الحل]unknown reason of error c ++ Empty رد: [تم الحل]unknown reason of error c ++

السبت أغسطس 22, 2020 11:41 am
هنا المشكلة كانت في الشرط في الfor loop كان لازم يبقى ناقص 1
متاسف على التاخير في الرد, تقريبا انا حاولت امسح الرسالة لاني عرفت الحل
الرجوع الى أعلى الصفحة
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى