Computer Science, asked by tanvipagar30, 8 months ago


Write event driven JavaScript
program for the following.
1. Display Addition, multiplication,
division and remainder of two
mumbers, which were accepted
from user.
2. Display number sequence from
100 to 150 in following format.
(100 101 102..........150)
3. Find and display factorial of
given number.
4. Accept any string from user and count and display number of vowels occurs in it.

Can somebody please help me w these javascript programs?

Answers

Answered by Vyomsingh
10

Answer:

import java.util.*;

class str

{

void main()

{

Scanner sc=new Scanner(System.in);

String k=sc.nextLine();

int len=k.length();

int count=0;

for(int a=0;a<len;a++)

{

char c=k.charAt(a);

if(c='a'||c='A'||c='e'||c='E'||c='i'||c='I'||c='o'||c='O'||c='u'||c='U')

{

count++;

}

}

System.out.println(count);

}

}

Explanation:

Similar questions