Skip to content

schleife

Amhussami edited this page Nov 22, 2018 · 1 revision

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package Schleife;

import java.util.Scanner;

/** * * @author Abdulmoti.Alhosami */ public class scleife2 { public static void main(String[] args) { Scanner sc =new Scanner(System.in); System.out.println("Bitte Zahl Eingeben "); int a =sc.nextInt(); System.out.println("Bitte zweite Zahl eingeben "); int b=sc.nextInt(); int c=0; for (int i= 1;i ⇐ 20 ; i++){ //the method c=a+b; System.out.println(c); a=b; b=c; }

        }
}

Clone this wiki locally