how to write a program that counts automorphic number from 1 to 999
Source Code :: import java.io.*; class automorphic { protected static void main()throws IOException { BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter the number: "); int a=Integer.parseInt(in.readLine()),b=a,c=0,e=a*a; while(b>0) { c++; b/=10; } double d=Math.pow(10,c-1); if(a==e%d) System.out.println("Automorphic number!!"); else System.out.println("Not an Automorphic number!!"); }}
d a tool for analysing c plus plus program
Every C plus plus program that is a main program must have the function 'main'.
example output of c++ calculator
it is a step by step program written in simple English for our understanding
By learning how to program on C+.
Source Code :: import java.io.*; class automorphic { protected static void main()throws IOException { BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter the number: "); int a=Integer.parseInt(in.readLine()),b=a,c=0,e=a*a; while(b>0) { c++; b/=10; } double d=Math.pow(10,c-1); if(a==e%d) System.out.println("Automorphic number!!"); else System.out.println("Not an Automorphic number!!"); }}
how do we use loops in c plus plus programing and what are basic differences between do,for and while loop
Yes, you can program games with C++.
R = (A > B && A > C) ? A : (B > C) ? B : C; // parentheses not necessary - for clarity only
cn = c0 *( 1 + i ) pow n
Exit the program and relaunch it.
for (int i = 15; i < 30; i += 2) cout << i << endl;
d a tool for analysing c plus plus program
int i, sum = 0; for (i=0; i<20; i+=2) sum+=i;
C++ is an extension of C, and was invented by Bjarne Stroustrup.
Every C plus plus program that is a main program must have the function 'main'.