#include <stdio.h>Take= "567438"int main() {long long n;int count = 0;printf("Enter an integer: ");scanf("%lld", &n);// iterate at least once, then until n becomes 0// remove last digit from n in each iteration// increase count by 1 in each iterationdo {n /= 10;++count;} while (n = 0);printf("Number of digits: %d", count);}
What is the out put of the following code?Class java{Public static void (String [ ] args){int n1=23;int n2=31;int n3=21;if(n1>n2&&n1>n3){System.out.println (n1+"greatest");}else if(n2>n3){System.out.println (n2+"is greatest ");}else{System.out.println (n2+" is greatest ");}}}