Solved Paper For Icse Computer Applications 2024
Solved Paper For Icse Computer Applications 2024
Solved Paper For Icse Computer Applications 2024
import java.util.*;
public class Eshop
{
String name;
double price;
import java.util.*;
class Vow
{
public static void main(String args[])
{
String str;int count=0;
Scanner sc = new Scanner(System.in);
System.out.println("Enter the word:");
str = sc.next();
str=str.toUpperCase();
System.out.println("Output:"+str);
for(int i=0;i< str.length();i++)
{
char c=str.charAt(i);
if(c=='A'||c=='E'||c=='I'||c=='O'||c=='U')
{
count+=1;
}
}
System.out.println("Number of Vowels:"+count);
}
}
QUESTION 6
import java.util.*;
class accept
{
public static void main(String args[])
{
int a[][],counteven=0,countodd=0;
a=new int[3][3];
Scanner sc=new Scanner(System.in);
System.out.println("Enter the array elements");
for(int i=0;i< 3;i++)
{
for(int j=0;j< 3;j++)
{
a[i][j]=sc.nextInt();
}
}
counteven+=a[i][j];
}
else{
countodd+=a[i][j];
}
}}
if(counteven==countodd)
{
System.out.println("Special array");
}
else{
System.out.println("Not a Special array");
}
}
}
QUESTION 7
import java.util.*;
class duck
{
public static void main(String args[])
{
int num;boolean check=false;
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number:");
num = sc.nextInt();
while(num!=0)
{
int d=num%10;
if(d==0)
check=true;
num/=10;
}
if(check)
System.out.println("Duck Number");
else
System.out.println("Not Duck Number");
}
}
QUESTION 8