(a) We are given a list of floating point numbers L := [39.68, 5.697, .9057E-3,
ID: 3530050 • Letter: #
Question
(a) We are given a list of floating point numbers L := [39.68, 5.697, .9057E-3, .5612E-2, 30.75, .1005E-3, 10.29, .2387E-1, .3347E-3, .9724E-1, 7.536, 8.207, 85.10, .2001, .4738, .2983E-2, .6860E-3, .4666E-1, 3.164, 63.59, .1311E-3, 2.915, 8.612, .3868E-2, .8995E-3, 8.487, .6143, .9891, .5100, 7.161, .8825, .7505E-3, .2372E-1, .3440E-3, 5.783, .4258E-3, .9256E-1, 60.52, .9271, 9.111, .3885E-2, 2.929, 3.494, 36.90, .8834E-2, .4789E-3, 74.42, .9165E-1, .2045, .3710E-2, .2585]; We want to count how many items in L fall into the following range: 0.012 <= L[i] < 0.027 Call this count c1. What is the value of c1? Enter an integer (without decimal point).Explanation / Answer
This is the answer of your que in java.Do u need answer in other language or what..I didnot get your comment.
Code starts From here
public class test1
{
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int count=0;
double[] L = {39.68, 5.697, .9057E-3, .5612E-2, 30.75, .1005E-3, 10.29, .2387E-1, .3347E-3, .9724E-1, 7.536, 8.207, 85.10, .2001, .4738, .2983E-2, .6860E-3, .4666E-1, 3.164, 63.59, .1311E-3, 2.915, 8.612, .3868E-2, .8995E-3, 8.487, .6143, .9891, .5100, 7.161, .8825, .7505E-3, .2372E-1, .3440E-3, 5.783, .4258E-3, .9256E-1, 60.52, .9271, 9.111, .3885E-2, 2.929, 3.494, 36.90, .8834E-2, .4789E-3, 74.42, .9165E-1, .2045, .3710E-2, .2585};
for(Double l: L)
{
if(0.012 <= l && l < 0.027 )
{
count++;
}
}
System.out.println("So the value of Count C1 is :"+count);
}
}
OUTPUT :Answer
So the value of C1 is : 2
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.