Computer Science, asked by braniest, 1 year ago

plz solve the seond series in java. make a program. second one (till 10 term)

Attachments:

Answers

Answered by sikhi
3
the above code will give the desired result.
Attachments:

braniest: thanks very much
braniest: it is wrong
braniest: dont take n2 in double quotes and add plus
braniest: n thank you very much
sikhi: ya ya by mistake i wrote n2 in double quotes
sikhi: sorry
braniest: np
Answered by siddhartharao77
3
public class Basic
 
{
    public static void main(String[] args)
 {
        int a = 12, b = 1, c = 1;

        System.out.print("The output is :  ");

        for (int i = 1; i <= a; ++i)     
       {       
        System.out.print(b+" ");

            int d = b + c;

            b = c;

            c = d;

        }}}
Similar questions