Programs related to C++ on Code Blocks
Pythonpedia Programs related to C++ on Code Blocks 1.Program to generate Armstrong number? Program:- Pythonpedia Code:- #include <stdio.h> int check_armstrong(int); int power(int, int); int main () { int c, a, b; printf("Input two integers\n"); scanf("%d%d", &a, &b); for (c = a; c <= b; c++) { if (check_armstrong(c) == 1) printf("%d\n", c); } return 0; } int check_armstrong(int n) { long long sum = 0, temp; int remainder, digits = 0; temp = n; while (temp != 0) { digits++; temp = temp/10; } temp = n; while (temp != 0) { ...