Java Apni Kak
For Loops: package com.company ; import java.util.* ; public class Main { public static void main (String[] args) { //Print sum of n numbers input taken by users, this code will give each step result Scanner sc = new Scanner(System. in ) ; int n = sc.nextInt() ; int sum = 0 ; /* How loops works * sum=0, 0+1, where 1= i * sum=1, 1+2, where 2= i * sum=2, 3+3, where 3(last one)= i * sum=6, 6+4, where 4= i * sum=10, 10+5, where 5= i * i Value reaches to condition * * */ for ( int i = 1 ; i <= n ; i++) { sum = sum+i ; System. out .println(sum) ; } } } public class Main { public static void main (String[] args) { //Print sum of n numbers input taken by users, this code will one result Scanner sc = new Scanner(System. in ) ; int n = sc.nextInt() ; int sum = 0 ; /* How loops works * sum=0, 0+1, where 1= i * sum=1, 1+2, where 2= i * sum=2, 3+3, where 3(la...