Search

Google
 
Showing posts with label for icse students. Show all posts
Showing posts with label for icse students. Show all posts

Thursday, November 27, 2008

ICSE ISC 2009 EXAM Time table

ICSE 2009 EXAM Time table

Draft time-table is out for ICSE – 2009
MARCH SUBJECT Time: All at 11:00am

..........

visit
http://icse.fairtopic.com/portal.htm


Register there to get free icse isc aieee iit help

Monday, April 28, 2008

Monday, February 4, 2008

ICSE JAVA String Program

write a program to accept a string and display the new string after removing all the vowels from the string
eg
input:Computer Applications with BlueJ
output:Cmptr pplctns wth BlJ



class test
{
void main(String a)
{
char d;for(int c=0;c < a.length();c++)
{
d=a.charAt(c);
if(d!='a' && d!='A' && d!='e' && d!='E' && d!='i' && d!='I' && d!='o' && d!='O' && d!='u' && d!='U')System.out.print(d);
}
}
}

From :http://icse.fairtopic.com

Sunday, January 27, 2008

ICSE Exam papers free online

visit http://www.syvum.com/exam/icse/

Wednesday, January 23, 2008

Write a java program that checks whether a given NUMBER is palindrome or not.

Write a java program that checks whether a given NUMBER is palindrome or not.


import java.io.*;
public class Palindromenumber
{
public static void main(String args[])throws IOException
{
DataInputStream din=new DataInputStream(System.in);
int num,remainder,result=0,n;
System.out.println("Enter the number:");
String s=din.readLine();num = Integer.parseInt(s);
n=num;
while(num>0)
{
remainder = num%10;result = result * 10 + remainder;num = num/10;
}
if(n==result)
{
System.out.println(n+"is palindrome" );
}else
{
System.out.println(n+" is not palindrome" );
}
}
}

Write a java program to display the product of two given matrices

Write a java program to display the product of two given matrices

public class Matrix
{
public static void main(String args[])
{
int a[][] ={{ 1, 2, 5 },{ 3, 4, 4 },{ 5, 6, 2 },};
int b[][] ={{ 7, 8, 9 },{ 1, 2, 3 },{ 4, 9, 5 },};
int c[][] = mult(a, b);
System.out.println("Result: ");
for (int i = 0; i < c.length; ++i)
{
System.out.print("{");
for (int j = 0; j < c.length; ++j)
{
System.out.print(" "+c[j]);
}
System.out.println("}");
}
}

public static int mult(int a[][], int b[][])[][]
{
int rows = a.length;
int cols = b[0].length;
int c[][] = new int[rows][cols];
for (int i = 0; i <>
{
for (int j = 0; j <>
{
c[j] = 0;
for (int k = 0; k <>
{
c[j]= a[k] * b[k][j]+c[j];
}
}
}
return c;
}
}

JAVA Program to check a String for palindrome

//!BjueJ :IDE for icse students!

import java.io.*;
class palindrome
{
public static void main(String arg[])throws IOException
{
DataInputStream in=new DataInputStream(System.in);
int l,i,j,flag=1;
String s;
System.out.println("Enter the string:");
s=in.readLine();
l=s.length();
for(i=0,j=l-1;i<=j;i++,j--)
{
if(s.charAt(i)==s.charAt(j))
{}
else
{
flag=0;
break;
}
}
if(flag==1)
System.out.print(s+" is palindrome");
else
System.out.print(s+" is not palindrome");
}
}

//VISIT http://icse.fairtopic.com for free help

JAVA icse bluej program Pythagorean triplet

Write a program to input 3 nos. and check whether they are Pythogorean Triplet . or not .The program must display the message accordingly.

some Pythagorean triplets are
( 3, 4, 5)
( 5, 12, 13)
( 7, 24, 25)
( 8, 15, 17)
( 9, 40, 41)
(11, 60, 61)
(12, 35, 37)
(13, 84, 85)
(16, 63, 65)
(20, 21, 29)
(28, 45, 53)
(33, 56, 65)
(36, 77, 85)
(39, 80, 89)
(48, 55, 73)
(65, 72, 97)


u may use them to test the program.

Answer:
//program starts
import java.io.*;
class pytha
{
void main()throws IOException
{
BufferedReader obj=new BufferedReader(new InputStreamReader(System.in));
int a,b,c;
System.out.println("enter no.");
a=Integer.parseInt(obj.readLine());
System.out.println("enter no.");
b=Integer.parseInt(obj.readLine());
System.out.println("enter no.");
c=Integer.parseInt(obj.readLine());
if (a*a==b*b+c*c)
System.out.println("They are Pythogorean Triplet");
else if(b*b==a*a+c*c)
System.out.println("They are Pythogorean Triplet ");
else if(c*c==a*a+b*b)
System.out.println("They are Pythogorean Triplet a² + b² = c² ");
else
System.out.println("Test Failed !!! They are Non Pythogorean Triplet ");
}
}
//if u want to consider a² + b² = c² only then remove first 2 conditions

JAVA program for icse students

A library charges a fine for books returned late following are the charges for fine:--
First 5 Days:- 40 paise / day
6-10 days :- 60 paise /day
above 10 days:- 1 rupee /day

do with buffer reader..

import java.io.*;
class buff
{
void main()throws IOException
{
BufferedReader obj=new BufferedReader(new InputStreamReader(System.in));
System.out.println("enter no. of days");
int a;
a=Integer.parseInt(obj.readLine());
double ans=0;
if (a<=5)
ans=a*.4;
else if(a<=10)
ans= 2 + ((a-5)*.6);
else
ans= 2 + 3 + a-10;
System.out.println("Fine:"+ans);
}
}

Ask JAVA related questions at http://icse.fairtopic.com