Skip to main content

Posts

Featured

Sum of Tenth and Unit Digits ID:2534-------Java - Programming Tracks JAVA - 50 EASY CHALLENGES JAVA - EASY - PART001

The program must accept a number N and print the sum of tenth and unit digits. Input Format: The first line denotes the value of N. Output Format: The first line contains the sum of tenth and unit digits. Boundary Conditions: 10 <= N <= 9999999 Example Input/Output 1: Input: 231 Output: 4 Example Input/Output 2: Input: 100 Output: 0 Example Input/Output 3: Input: 192 Output: 11 import java.util.*; public class Hello {     public static void main(String[] args) { Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=a%10; int c=(a%100)/10; System.out.print(b+c); } }

Latest Posts

Country Capital Java avg part 3

Maximum Repeating Count (Id-229) JAVA - AVERAGE - PART003

Most Fuel Efficient Cars Java Avg 003

Difference between LCM and HCF of two numbers

Character B follows A

Next Number Palindrome java avg part 3

Find AM or PM JAVA AVG PART 003

Find the digital sum Java Avg part3

Adamant kid java Java Avg part 3

Reverse and remove letters in vowel positions Java Avg part-03