Welcome to my YouTube channel dedicated to computer programming education in ICSE/ISC schools in India! My channel is designed to be a valuable resource for students and educators alike, providing engaging and informative content on various programming languages, tools, and techniques.

Whether you're a beginner or an experienced programmer, my channel has something for everyone. I offer step-by-step tutorials, coding challenges, and real-world examples to help you build your skills.

I am passionate about helping students develop their coding skills and unlock their full potential. I believe that learning to code is a valuable skill for the 21st century, and my mission is to make it accessible and enjoyable for everyone.

So, whether you're looking to learn the basics of programming or take your skills to the next level, be sure to subscribe to my channel! Thank you and all the very best!


Robin Sir

Which of these questions do you find the most difficult and challenging to solve during practical exams?

1 year ago | [YT] | 4

Robin Sir

What will be the value of x in this Java code?
int x = 5;
x += 2.5;

1 year ago | [YT] | 9

Robin Sir

Students matching answers after the exam gets over. All the very best for your mid-term exams!

1 year ago | [YT] | 11

Robin Sir

A trip to the nearest star system, Alpha Centauri, might take an astronaut 4.5 Earth years if the ship travels near the speed of light. However, because time is slowed at higher speeds, the astronaut would age only 0.5 years during the trip.

1 year ago | [YT] | 9

Robin Sir

Evaluate the result of the Java expression (-7 % -2).

1 year ago | [YT] | 6

Robin Sir

In Java, a class can implement multiple interfaces.

2 years ago | [YT] | 0

Robin Sir

Which keyword disables a class from being inherited in Java?

2 years ago | [YT] | 0

Robin Sir

In context with Java, which of these data types is immutable?

2 years ago | [YT] | 9

Robin Sir

In Java, what is the return type of Math.round(12.25F)?

2 years ago | [YT] | 5

Robin Sir

Amicable numbers are two distinct natural numbers such that the sum of the proper divisors of each number is equal to the other number.

For example, the smallest pair of amicable numbers is 220 and 284.
The proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110.
Their sum = 1 + 2 + 4 + 5 + 10 + 11 + 20 + 22 + 44 + 55 + 110 = 284.
The proper divisors of 284 are 1, 2, 4, 71, 142.
Their sum = 1 + 2 + 4 + 71 + 142 = 220.

Some more amicable number pairs are 1184 and 1210, 2620 and 2924, etc.

Write a Java program to input two integers and check whether they form amicable numbers or not.

import java.util.Scanner;
class Amicable{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
System.out.print("First number: ");
int a = Math.abs(Integer.parseInt(in.nextLine()));
System.out.print("Second number: ");
int b = Math.abs(Integer.parseInt(in.nextLine()));
if(sumOfProperFactors(a) == b && sumOfProperFactors(b) == a)
System.out.println("They are amicable numbers!");
else
System.out.println("They are NOT amicable numbers.");
}
public static int sumOfProperFactors(int n){
int sum = 0;
for(int i = 1; i <= n / 2; i++){
if(n % i == 0)
sum += i;
}
return sum;
}
}

2 years ago (edited) | [YT] | 14