Posts

Important Programme in JAVA for Class 10 ICSE Board

Programme List 1-  Write a  program to print the first 15 numbers of the Pell series in JAVA Prgramming Language In mathematics, the Pell numbers are an infinite sequence of integers. The sequence of Pell numbers starts with 0 and 1, and then each Pell number is the sum of twice the previous Pell number and the Pell number before that.: thus, 70 is the companion to 29, and 70 = 2 × 29 + 12 = 58 + 12. The first few terms of the sequence are : 0, 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, 13860 2-  Write a programme to check whether a number is a MAGIC number or not?  

Write a program to print the first 15 numbers of the Pell series in JAVA Prgramming Language

Write a  program to print the first 15 numbers of the Pell series in JAVA Prgramming Language In mathematics, the Pell numbers are an infinite sequence of integers. The sequence of Pell numbers starts with 0 and 1, and then each Pell number is the sum of twice the previous Pell number and the Pell number before that.: thus, 70 is the companion to 29, and 70 = 2 × 29 + 12 = 58 + 12. The first few terms of the sequence are : 0, 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, 13860,… Solution : import java.util.*; public class pellnumber   {     public static void main(String args[])     { int n,a=1,b=0,c;     System.out.println("First 20 Pell numbers: ");     for(n=1; n<=20; n++)      {       c= a + 2*b;       System.out.print(c+" ");       a = b;       b = c;      }    }  } Back to Programme List

Write a programme to check whether a number is a MAGIC number or not?

import java.util.*; public class MagicNumberCheck {  public static void main(String args[])  {  Scanner ob=new Scanner(System.in) ;  System.out.println("Enter the number to be checked.");  int n=ob.nextInt();  int sum=0,num=n;  while(num>9)  {  sum=num;int s=0;  while(sum!=0)  {  s=s+(sum%10);  sum=sum/10;  }  num=s;  }  if(num==1)  {  System.out.println(n+" is a Magic Number.");  }  else  {  System.out.println(n+" is not a Magic Number.");  }  } }

ISC Computer Science - Propositional Logic

Propositional Logic Logic  is a formal method of reasoning. A  proposition  is an elementary atomic sentence that may either be true or false but may take no other value. A  simple proposition  is one that does not contain any other proposition as a part. A  compound proposition  is one with two or more simple propositions as parts. An  operator  or  connective  joins simple propositions into compounds. Following are the various types of connectives: 1.     Disjunctive (OR) : It means at least one of the two arguments is true. OR is represented by + or ∨ . 2.     Conjunctive (AND) : It means that both the arguments are true. AND is represented by or & or ∧ . 3.     Conditional (Implication or If Then) : It means that if one argument is true then other argument is true. Implication is represented by ⇒ or → or ⊃ . 4.     Bi-conditional (Equivalence or If And Only If):  It means that either both arguments are true or both are false. Equivalence is represented

ICSE CLASS 10 COMPUTER APPLICATION - Chapter 2: The Java Phenomenon

1.   What is the significance of WWW? Ans. WWW or World Wide Web allows a huge pool of information (as web pages) to shared by multiple users over a World Wide Network (Internet) and the introduction of Java makes the web pages dynamic and interactive in a secured manner. 2.   What is Browsing? Ans. Browsing over the internet allows surfing through the internet, thus enabling the users to see information in different pages and interact with it. 3.   Name two types of Java programs. 4.   Why is Java choice for the Web? Ans. The introduction of active web pages makes Java an attractive addition to the web page. When we click on a web page containing a Java applet, it is not that we just read it, listen to it, or watch it– we can interact with it. The dynamic, interactive content to the web was brought about by Java: So much so web applications made in Java runs as if it is a computer program installed in the local computer. 5.   What is Jav