Java Development
Відкрити в Telegram
Learn something new in quality Instagram Link Java_Quizs https://instagram.com/java_quizs?utm_medium=copy_link
Показати більшеКраїна не вказанаТехнології та додатки34 716
2 283
Підписники
Немає даних24 години
Немає даних7 днів
Немає даних30 день
Архів дописів
2 283
/* Question - 04
Java Program To Find Given Number Is Armstrong Number Or Not
*/
package ABC;
import java.util.*;
public class Main {
public static void main(String[] args) {
int Num,Rem,Sum=0,Var;
Scanner s = new Scanner(System.in);
System.out.print("Enter The Number :");
Num = s.nextInt();
Var = Num;
while(Num!=0) {
Rem = Num%10;
Sum = Sum+Rem*Rem*Rem;
Num = Num/10;
}
if(Sum==Var)
{
System.out.println(Var+" Is A Armstrong Number");
}
else
{
System.out.println(Var+" Is Not A Armstrong Number");
}
}
}
2 283
#Quiz_Java (Question - 79)
Which of this keyword must be used to inherit a class?
2 283
#Quiz_Java (Question - 78)
Which of the following is not an OOPS concept?
2 283
/* Question - 03
Java Program To Check Whether Given Number Is Palindrome Or Not
*/
package ABC;
import java.util.*;
public class Main {
public static void main(String[] args) {
int Num,Rem,Sum=0,Var;
Scanner s = new Scanner(System.in);
System.out.print("Enter The Number :");
Num = s.nextInt();
Var = Num;
while(Num!=0) {
Rem = Num%10;
Sum = Sum*10+Rem;
Num = Num/10;
}
if(Sum==Var)
{
System.out.println(Var+" Is A Palindrom Number");
}
else
{
System.out.println(Var+" Is Not A Palindrom Number");
}
}
}
2 283
#Quiz_Java (Question - 77)
What is the output of the following expression round(4.576)
2 283
/* Question - 02
Java Program To Reversing A Given Number
*/
package ABC;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int num,rev=0,rem;
System.out.println("Enter The Number :");
num = s.nextInt();
System.out.println("Original Number: " + num);
while(num != 0) {
rem = num%10;
rev = rev*10+rem;
num = num/10;
}
System.out.println("Reversed Number: " + rev);
}
}
2 283
#Quiz_Java (Question - 76)
Which of these are not a valid flow control statement?
2 283
/* Question - 01
To Find Factorial Of A Number
*/
package ABC;
import java.util.*;
public class Hello
{
public static void main(String[] args)
{
Scanner s1 = new Scanner(System.in);
System.out.println("Enter The Value Of n :");
int n = s1.nextInt();
int fact = 1;
for(int i=1;i<=n;i++)
{
fact = fact * i;
}
System.out.println("Factorial of "+ n +" is " + fact);
}
}
2 283
If Any One Want To Suggest (Ideas / How Can I Post Questions) On Programming Language
Comment Below !! So That, We Know
2 283
Either We Post Programs On C Or Java Language??
Basic To Advance ......
2 283
/* Question - 12
C Program to Swap Two Numbers Without Using Third Variable
*/
#include <stdio.h>
int main()
{
int a, b;
printf("Enter first number: ");
scanf("%d", &a);
printf("Enter second number: ");
scanf("%d", &b);
printf("Before Swapping The Numbers %d %d",a,b);
// Swapping Of Two Numbers
a = a + b;
b = a - b;
a = a - b;
printf("\nAfter Swapping The Numbers %d %d",a,b);
return 0;
}
2 283
#Quiz_Python (Question - 75)
In order to store values in terms of key and value we use what core data type
2 283
#Quiz_Java (Question - 74)
What is the size of a LONG integer in Java?
2 283
#Quiz_C (Question - 73)
Which of the following is a ternary operator?
2 283
/* Question - 11
C Program to Swap Two Numbers
*/
#include <stdio.h>
int main()
{
int a, b, temp;
printf("Enter first number: ");
scanf("%d", &a);
printf("Enter second number: ");
scanf("%d", &b);
printf("Before Swapping The Numbers %d %d",a,b);
// Swapping Of Two Numbers
temp = a;
a = b;
b = temp;
printf("\nAfter Swapping The Numbers %d %d",a,b);
return 0;
}
2 283
#Quiz_Python (Question - 72)
What is output of print(math.pow(3, 2))?
