Advertisements
Advertisements
प्रश्न
Write a program to display all the numbers between 100 and 200 which don't contain zeros at any position.
For example, 111, 112, 113, ..............................., 199
संक्षेप में उत्तर
उत्तर
import java.util.*;
public class Q5
{ public static void main(String args[])
{
Scanner in = new Scanner(System.in);
String name;
double math, eng, sci, avg;
int n;
System.out.printIn("Enter the number of students");
n = in.nextInt();
for (int i = 1; i <= n; i++)
{System.out.print("Enter the name of the student :");
name = in.next();
System.out.print("Enter the marks scored in math: ");
math = in.nextDouble();
System.out.print("Enter the marks scored in English: ");
eng = in.nextDouble();
System.out.print("Enter the marks scored in science: ");
sci = in.nextDouble();
avg = (math + sci + eng) / 3;
System.out.println("Name: " + name);
System.out.println("Average: " + avg);
System.out.println();
}}}
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?