0

simple java programm

Can anyone help me solve this problem? Write a Java program that computes nth term of the following sequence: U0 = 1; U1 = 2; Un+2 = 2*Un+1 + Un + 1.

8th Oct 2021, 4:46 PM
Maryam Magdy
Maryam Magdy - avatar
9 Respostas
+ 2
Maryam Magdy There is just little mistake. Do a0 = a1 a1 = result Also import Scanner class import java.util.Scanner; https://code.sololearn.com/cMk4xzHHCQ8u/?ref=app
8th Oct 2021, 6:02 PM
A͢J
A͢J - avatar
+ 1
Maryam Magdy Where is your solution?
8th Oct 2021, 4:54 PM
A͢J
A͢J - avatar
+ 1
Oh yes thank you!
8th Oct 2021, 6:04 PM
Maryam Magdy
Maryam Magdy - avatar
+ 1
https://code.sololearn.com/cGw5GmJMEB3S/?ref=app I made a little change to out put first and second term in the sequence. Have a look A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟
8th Oct 2021, 6:31 PM
Maryam Magdy
Maryam Magdy - avatar
+ 1
Maryam Magdy Nice I have changed too see once
8th Oct 2021, 6:50 PM
A͢J
A͢J - avatar
8th Oct 2021, 7:04 PM
Maryam Magdy
Maryam Magdy - avatar
0
Gostaria de programar uno código alguém mi ajuda
9th Oct 2021, 6:09 PM
Bizeque Luis
9th Oct 2021, 6:10 PM
Bizeque Luis