Search

Google
 
Showing posts with label model test paper. Show all posts
Showing posts with label model test paper. Show all posts

Sunday, January 27, 2008

ICSE Exam papers free online

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

Saturday, January 26, 2008

ICSE Computer JAVA question

Guess the output of this java program.

class CoolProg
{
static void main()
{
System.out.println(Math.random());
System.out.println("over"+2+3);
System.out.println(2+3+"over"+0);
System.out.println(2+3+"over");
System.out.println(2+3+'A'+-1);
System.out.println('a'+"bhas");
System.out.println('A'+ 2);
System.out.println('A'+ 2);
int b=1;
int c=-b;
System.out.println(-b);
System.out.println(c);
String s="abhas";
System.out.println(s.substring(3,5));
System.out.println(s.substring(0,3));
System.out.println(s.substring(4));
System.out.println(s.substring(2));
}
}

/* * answer

0.6834987231679766 (random no less than 1)
over23
5over0
5over
69
abhas
67
67
-1
-1
as
abh
s
has

*/

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 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

Tuesday, January 22, 2008

2008 ICSE AND ISC TIME TABLE

http://icse.fairtopic.com/ 2008 ICSE TIME TAME/Exam schedule

Complete ICSE help forum

Complete ICSE help forum
ICSE Students can discuss and seek answers for their problems and issues here
http://icse.fairtopic.com/

maths,science,computer and english
forum for icse students

Free 2008 model test papers for icse
http://icse.fairtopic.com/