👋 Welcome to ᴄᴏᴅᴇ ᴡɪᴛʜ ᴋᴜsʜᴀʟ 👨🏻💻!
Your go-to channel for the most searched & essential coding programs — easy to learn, practical, and interview-ready!
Get ready for your first coding program! 💻🚀
Your go-to channel for the most searched & essential coding programs — easy to learn, practical, and interview-ready!
Get ready for your first coding program! 💻🚀
📌 𝐏𝐫𝐨𝐠𝐫𝐚𝐦 : Hello World
🧠 𝐃𝐞𝐬𝐜𝐫𝐢𝐩𝐭𝐢𝐨𝐧 :
The classic beginner program — print "Hello World"
👁️ 𝐎𝐮𝐭𝐩𝐮𝐭 :
🧠 𝐃𝐞𝐬𝐜𝐫𝐢𝐩𝐭𝐢𝐨𝐧 :
The classic beginner program — print "Hello World"
👁️ 𝐎𝐮𝐭𝐩𝐮𝐭 :
Hello, World!public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}#include <iostream>
using namespace std;
int main() {
cout << "Hello, World!";
return 0;
}
using System;
class Program {
static void Main() {
Console.WriteLine("Hello, World!");
}
}
📌 Program Title : Check if a number is Even or Odd
🧠 Description :
This program checks whether a given integer is even or odd. An even number is divisible by 2, while an odd number is not. The user is prompted to enter an integer, and the program outputs either "Even" or "Odd" based on the result.
📥 Input: An integer (e.g., 7)
📤 Output: A single word:
"Even" – if the number is divisible by 2
"Odd" – otherwise
🧪 Example:
🧠 Description :
This program checks whether a given integer is even or odd. An even number is divisible by 2, while an odd number is not. The user is prompted to enter an integer, and the program outputs either "Even" or "Odd" based on the result.
📥 Input: An integer (e.g., 7)
📤 Output: A single word:
"Even" – if the number is divisible by 2
"Odd" – otherwise
🧪 Example:
Input: 4
Output: Evennum = int(input("Enter a number: "))
if num % 2 == 0:
print("Even")
else:
print("Odd")import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
if (num % 2 == 0)
System.out.println("Even");
else
System.out.println("Odd");
}
}
let num = parseInt(prompt("Enter a number:"));
if (num % 2 === 0) {
console.log("Even");
} else {
console.log("Odd");
}