My Class 10 Icse Computer File
My Class 10 Icse Computer File
JOHN’S SCHOOL
UPSIDC,FIROZABAD
JAVA
PROGRAMMING
SUBJECT:COMPUTER
begins
APPLICATIONS
SESSION: 2024-25
}
for(i=0;i<9;i++)
{
min=ar[i];
minpos=i;
for(j=i+1;j<10;j++)
{
if(ar[j]<min)
{
min=ar[j];
}
temp=ar[minpos];
ar[minpos]=ar[i];
ar[i]=temp; }
for(i=0;i<10;i++)
{
System.out.print(ar[i]+" ");
}
}
}
}
Program 11
Write a program to input a
sentence ,and convert the
small letters to capital letters
and vice versa.
import java.util.*;
class word_count
{
public static void main()
{
Scanner sc=new Scanner(System.in);
String str,newstr="";
int i,l,cw=0;
char ch,ch1;
System.out.println("Enter a sentence");
str=sc.nextLine();
l=str.length();
for(i=0;i<1;i++)
{
ch=str.charAt (i);
if(ch>='A'&& ch<='Z')
ch1=(char)(ch+32);
else
if(ch>'a'&& ch<='z')
ch1=(char)(ch-32);
else
ch1=ch;
newstr=newstr+ch1;
}
System.out.println("Old String:"+str);
System.out.println("Converted string :"+newstr);
}
}
Program 12
C R
CO ER
COM TER
COMP UTER
COMPU PUTER
COMPUT MPUTER
COMPUTE
OMPUTER
COMPUTER
COMPUTER
import java.util.*;
class pattern_choice
{
public static void main()
{
Scanner sc=new Scanner (System.in);
String wd,extwd;
int i,l,j,ch;
System.out.print("Enter a word ");
wd=sc.next();
wd=wd.toUpperCase();
l=wd.length();
System.out.println("Enter 1 for pattern 1/ 2 for
pattern 2");
ch=sc.nextInt();
switch(ch)
{
case 1:
for(i=0;i<1;i++)
{
extwd=wd.substring(0,i+1);
System.out.println(extwd);
}
break;
case2:
for(j=i;j<1;j++)
{
extwd=extwd+wd.charAt(j);
}
System.out.println(extwd);
}
break;
default: System.out.println("Wrong choice");
}
}
Program 15
Write a program to initialize the seven
Wonders of the World along with their
locations in two different arrays.
Search for a name of the country
input by the user. If found, display the
name of the country along with its
Wonder, otherwise display "Sorry not
found!".
Seven Wonders:
CHICHEN ITZA, CHRIST THE
REDEEMER, TAJ MAHAL, GREAT
WALL OF CHINA, MACHU PICCHU,
PETRA, COLOSSEUM
Locations:
MEXICO, BRAZIL, INDIA, CHINA,
PERU, JORDAN, ITALY
import java.util.Scanner;
public class SevenWonders
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
String[] w = { "CHICHEN ITZA", "CHRIST THE
RDEEEMER", "TAJMAHAL", "GREAT WALL OF CHINA",
"MACHU PICCHU", "PETRA", "COLOSSEUM" };
String[] l = { "MEXICO", "BRAZIL", "INDIA", "CHINA",
"PERU", "JORDAN", "ITALY" };
{
String s=s1+" "+s2;
System.out.println(s);
}
}
Program 17
if(Character.isLetter(ch1)&&Character.isLetter(ch2)&&(c
h1==ch2))
{
c++;
}
}
System.out.println(c);
}
}
Program 18
www.github.com
www.brainly.com
Touch pad computer application I.C.S.E class
10th
www.discord.com