#include int main() { // Write C++ code here int i=1,j; printf("Enter the number you wish to print: "); scanf("%d", &j); printf("\nUsing while loop:\n"); while (i<=j) { printf("%d\t",i); i++; } i--; printf("\n\nOn the Reverse Order:\n"); while (i>=1) { printf("%d\t",i); i--; } printf("\n\nUsing for loop:\n"); for (i=1;i<=j;i++) { printf("%d\t",i); } i--; printf("\n\nOn the Reverse Order:\n"); for (;i>=1;i--) { printf("%d\t",i); } printf("\n\nUsing for do while:\n"); do { printf("%d\t",i), i++; } while (i<=j); i--; printf("\n\nOn the Reverse Order:\n"); do { printf("%d\t",i); i--; } while (i>=1); return 0; } int main() { // Write C++ code here int i, RN; printf("Enter the number: "); scanf("%d",&i); for (int j=1; j <= i; j++) { if (i % j == 0) { printf("%d\n",j);} } while ( i != 0) { int digit = i % 10; RN = RN * 10 + digit; i = i / 10; } printf("reversed number: %d\n", RN); return 0; }