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

Programming Exercises

Write a program to check if a number is Armstrong or not.

Medium

Problem Statement

Write a program to check if a number is Armstrong or not.

Sample Input

int n = 153;

Sample Output

153 is an Armstrong number.

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <cmath> #include <iostream> int main() { int n = 153; // Logic to check Armstrong number return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
int n = 153;
Expected Output
153 is an Armstrong number.