Multiplication Table programExplanation: Step 1: First we need to take the input from the user. Step 2: Next we need to take the for loop and iterate till i<=10 so that it can calculate up to 10. Step 3: we need to start iterating from i=1 and keep on iterating until input numb...1MDec 26, 2022 路 1 min readsmartcookie.hashnode.dev
Nth Natural Numbers Sum and Its AverageExplanation: Step 1: First we need to take the nth term value from the user. For that, we are taking the Scanner class object to take input. Step 2: With that input, we need to store that input number in some variable. Step 3: now we need to iterate ...Dec 26, 2022 路 2 min readsmartcookie.hashnode.dev
N Natural numbers its sum programExplanation: Step 1: First we need to take the nth term value from the user. For that, we are taking the Scanner class object to take input. Step 2: With that input, we need to store that input number in some variable. Step 3: now we need to iterate ...Dec 26, 2022 路 2 min readsmartcookie.hashnode.dev
Print first 10 Natural NumbersExplanation : Natural Numbers: Natural numbers are those numbers used for counting and ordering. Step 1: To find the natural number we are going to use the for loop to print the first 10 numbers. Step 2: we have taken the variable i=1 which will iter...Dec 26, 2022 路 1 min readsmartcookie.hashnode.dev
Leap Year or Not ProgramExplanation: Java code : import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); System.out.print("Enter a Year = "); int year = sc.nextInt(); if(y...Dec 25, 2022 路 2 min readsmartcookie.hashnode.dev