All Programming Question in Written test Repotation.com =============================================================================================================================================== Q.1- ============ Input: 9876565 Expected Output is: 1 Hint:9+8+7+6+5+6+5=10 =1 Input is Possitive Number Only. Coading Part: //Q.1 import java.util.Scanner; class ClassA { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int sum=0,rem=0; while(true){ sum=0; while(n!=0){ rem=n%10; sum=sum+rem; n/=10; } if(sum<10){ System.out.println(sum); break; } n=sum; } } } ====================================================================== Q.2- =========== Input :"for{do{print}}" Output: balanced Input:"while{do}a=5}" Output:Unbalanced Coading Part:
Success of Your life.These website will provides the latest technology and also provide the development of programming logic. computer science branch this website is very important. Every day practice code and developed the logic.