Trending ▼   ResFinder  

ICSE Computer Series Answers

8 pages, 20 questions, 1 questions with responses, 1 total responses,    0    0
Dimpy Singh
St. Helena's School and Junior College, Pune
10
+Fave Message
 Home > musicismylife >   F Also featured on: icse_prelims adarshpankaj

Formatting page ...

Pythagorean Triplets: //Program to print the Pythagorean triplets from 1 to 200 //A Pythagorean triplet is one that satisfies the condition //h*h=b*b+ht*ht for a right-angled triangle public class pythgorean { public void finfPythagorean() { int b,ht,hy; for(b=1; b<=200;b++) { for(ht=1;ht<=200;ht++) { for(hy=1;hy<=200;hy++) { if(ht<b) continue; else if((b*b+ ht*ht)==(hy*hy)) { System.out.println(b+ +ht+ +hy); //delay loop to hold scrolling of output for(int delay=1;delay<=1000000000;delay++){} }//Endelse }//End innermost loop }//End middle loop }//End Outermost loop }//End method }//Endclass Fibonacci Series: A fibonacci series is one in which the next term is the sum of previous two terms eg. 0 1 1 2 3 5 8 //to print the fibonacci series till n terms public class Fibonacci { void func(int n) { int a=0, b=1, c=0, i; System.out.print( a + , + b); for(i=3;i<=n;i++) { c=a+b; System.out.print( , + c); a=b; b=c; } }} Tribonacci Series:

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Adithya Kannan

(1)

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

© 2010 - 2024 ResPaper. Terms of ServiceContact Us Advertise with us

 

musicismylife chat