Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a program to print all the odd numbers between 1 and a hardcoded number.

Easy

Problem Statement

Create a program to print all the odd numbers between 1 and a hardcoded number.

Sample Input

Number: 10

Sample Output

Odd Numbers: 1 3 5 7 9 

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
using System; class PrintOddNumbers { static void Main() { // Print all odd numbers up to the given number } }
Log in or sign up to run or submit your code.Log inSign up
Input
Number: 10
Expected Output
Odd Numbers: 1 3 5 7 9