Computer Science, asked by abhinavmikraistar, 3 months ago

Write a Java program to print the following series:

0,1,2,3,6

Print 20 number in the series​


gabbarhere: hlo
Anonymous: hi
Himaanshu000: i am from Madhya Pradesh
Anonymous: okay I am from Uttar Pradesh
gabbarhere: okay i am from Himachal pradesh
Himaanshu000: plz thanks in my all amswer
Anonymous: wow all three from Pradesh's
Himaanshu000: plz subscribe my channel A_S_Gaming
Anonymous: bro Yaar khali iskeliye comment Kar rahe Ho
Anonymous: oh ab samjha...

Answers

Answered by Anonymous
5

\huge\pink{\fbox{\fbox{\fbox{Answer:}}}}

public class Tribonacci

{

public static void main ( String args [ ] )

{

int a = 0 , b = 1 , c = 2 , d = 0 ; System.out.print ( a + " " + b + " " + c ) ;

for ( int i = 1 ; i < = 20 ; i ++ )

{

d = a + b + c ;

System.out.print ( " " + d ) ;

a = b ;

b = c ;

c = d ;

}

}

}


gabbarhere: mee too Richa ✌
Anonymous: question or answers Ka alag alag comment section hota hai
Anonymous: are Vivaan abhi yaha par abhinav bhaiya v online h aur mai bhi to confuse mat hoiyega..xD - Richa
Anonymous: like see comment section of Himanshu's answer is different than ours Richa and Vivaan
Anonymous: ohk ab aap dono baat kijiye mai ja rhi hu tata by by ..- Richa
Anonymous: Haan Vivaan ji
Anonymous: Mai BHI bye bye tata
Anonymous: so jao behna and Vivaan ji
Anonymous: good night and sweet dreams again and last time
gabbarhere: kitaa confuse karoge yarr
Answered by Himaanshu000
0

Answer:

Write a Java program to print the following series:

0,1,2,3,6

Print 20 number in the series


Anonymous: like if I comment here it is different part
Anonymous: samjhe bhaiyon aur behna
Similar questions