Lana.s
حاولت وسويت حوسه وغيرت لكن مافيه فايده =(
للأسف فيه فرق كبير بين البرنامجيييين =(
حاولت أحله لكن يقول لي فيه اغلاط كثير ماعرفتها ايش ؟
وكمان لازم نستخدم else مع while ؟؟
هذا حلي يارب تساعدوني ..
كود:
import java.util
public class voule
{
public static void main(string [] args )
{
scanner console = new scanner (system.in);
string str;
int numofvo;//number of voule letter
int v=0;
int i=0;
char vo;
system.out.println("enter the string");
numofvo=numofint=console.nextint()
str=console.nextline();
while (i<str.length())
{
vo=str.charat(i);
if(vo=='a'|| vo=='a')
v++;
if(vo=='e' || vo=='e')
v++;
if(vo=='o' || vo=='o')
v++;
if(vo=='u'|| vo=='u')
v++;
if(vo=='i'|| vo=='i')
v++;
i++;
}
system.out.println("the number of voule letter is:"+numofvo);
}
}