Trending ▼
ICSE
CBSE 10th
ISC
CBSE 12th
CTET
GATE
UGC NET
Vestibulares
ResFinder
ICSE Computer Series Answers
8 pages, 0 questions, 0 questions with responses, 0 total responses
,
0
0
Dimpy Singh
St. Helena's School and Junior College, Pune
10
+Fave
Message
Profile
Timeline
Uploads
Home
>
musicismylife
>
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 ...
Formatting page ...
Formatting page ...
Formatting page ...
Formatting page ...
Formatting page ...
Formatting page ...
Print intermediate debugging step
Show debugging info
Hide debugging info
Horizontal lines at:
Guest Horizontal lines at:
AutoRM Data:
Box geometries:
Box geometries:
Text Data:
© 2010 - 2024 ResPaper.
Terms of Service
Contact Us
Advertise with us