import java.util.Scanner;
public class Numbers
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int max = -100;
int min = 100;
int sum = 0;
System.out.println("Enter ten integers");
for(int i = 0; i < 10; i++)
{
int input = scan.nextInt();
if(input > max)//test if the number entered is larger than any previous number
max = input;
if(input < min)//test if the number entered is smaller than any previous number
min = input;
sum += input;//add the input to the sum
}
System.out.println("The maximum number entered is: " + max +
"\nThe minimum number entered is: " + min +
"\nThe average of the numbers is: " + (sum / 10));//prints out the results
}
}
To write a C++ program to display the student details using class and array of object.
You do nothing! A sequence of numbers will contain no X and so nothing needs doing!
"Mean" usually means "average", so you just add the numbers together, then divide by 8.
ring me and ill explain - 086 22222222222222227 ring me
program to extract a given word from a file
write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html
To write a C++ program to display the student details using class and array of object.
You do nothing! A sequence of numbers will contain no X and so nothing needs doing!
Reference: cprogramming-bd.com/c_page4.aspx#ODD%20 Numbers
"Mean" usually means "average", so you just add the numbers together, then divide by 8.
ring me and ill explain - 086 22222222222222227 ring me
for(int i = 1; i < 100; i+=2) { System.out.println(i); }
program to extract a given word from a file
Count all the given numbers then count all the numbers of a given value. Divide one by the other and multiply by 100. For instance, if there are 50 numbers in total and 5 of them have the value 42, then the percentage of numbers with the value 42 is 5 / 50 * 100 = 10%.
It is your face
The average of a set of numbers is defined as the sum of those numbers divided by the number of numbers. If the average is given, multiply that by number of items in the set including the missing number. Subtract the sum of given numbers from this quotient and the missing number is revealed.
Without knowing what the numbers are, I would suggest taking the mean of the given numbers.