Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Study the following portion of a Jjava program and answer the questions that follows.



while(i < 4){



j = 0;



While(j < 5){



System.out.println(“Please enter the value to be stored”);



Marks[i][j] = scan.nextInt();



j++;



}



i++;



}



i)



What do we call this block of code in programming?



[5]



ii)



What is the function of this block of code?



[5]



iii)



Using a table, write out the output of these statements.



[

Write a java program that receives two values from the user, adds them together and


display the answer.

Write a java program that would display the 8 shape using the ‘*’ characte


#include<iostream>


using namespace std;


int area(int);


int area(int,int);


float area(float);


float area(float,float);


int main()


{


int a,length,b;


float radius,base,ht;


cout<<"enter one side of the square";


cin>>a;


cout<<"enter length and breadth the rectangle:";


cin>>length>>b;


cout<<"enter the radius of the circle:";


cin>>radius;


cout<<"enter the base and height of the triangle:";


cin>>base>>ht;


cout<<"Area of square = "<<area(a);


cout<<"\nArea of rectangle = "<<area(length,b);


cout<<"\nArea of circle = "<<area(radius);


cout<<"\nArea of triangle = "<<area(base,ht);


}


int area(int a)


{


return(a*a);


}


int area(int length,int b)


{


return(length*b);


}


float area(float radius)


{


return(3.14*radius*radius);


}


float area(float base,float ht)


{


return((base*ht)/2);


}





Output

The _________ is to visit the left subtree of the current node first, then the right subtree of the current node, and finally the current node itself.

A __________ (with no duplicate elements) has the property that for every node in the tree the value of any node in its left subtree is less than the value of the node and the value of any node in its right subtree is greater than the value of the node.


A. binary search tree


B. list


C. linked list


D. binary tre

Write the output and if there is an error correct the error first then write the output:


1.for(int a=1; a<=3; a++)

  for(int b=2; b<5; b++)

   out.print(a+b + " ");

   

   

   

2.for(int i=2; i<=6; i++){

  for(int j=1; j<=i; j++)

   out.print('*');

  out.println();

}

 

 

   

3.int total = 0;

for(int c=2; c<7; c++)

  for(int d=1; d<=c; d++)

   total = total + d;

out.println(total);

 

 

 

4.String s = "apluscs";

for(int e=0; e<s.length(); e++)

  for(int f=0;f<=e;f++){

   System.out.print(s.charAt(f));

 }

  System.out.println();

}

 

​​

 

5.for(int count1=1; count1 <= 5; count1++)

{

for (int count2=1; count2 <= 5; count2++)

System.out.print (count1*count2 + " ");

System.out.println();

}

 

6.public static void main(String args[]) {

   int a,b;

   a = 3;

   b = 4;

    System.out.println(three(a,b));

  }

  public static int three(int x, int y) {

   int a;

   a = x + y;

   return a;

  }


Write the output and if there is an error correct the error first then write the outp:

 

1.for(int i=-3; i<19; i=i+3)

{

 out.print(i + " ");

}

 

2.for(int j=17; j>-2; j=j-2)

{

 out.print(j + " ");

}

 

3.for(int x=20, x<50, x=x+3)

{

 out.print(x + " ");

}

  

4.for(m=37; m>0; m=m-4)

{

 out.print(m + " ");

}

 

5.int total=0;

for(int s=1; s<19; s++)

{

 total=total+s;

}

out.println(total);



6.int x=-2;

while(x<9)

{

 x++;

  System.out.print(x + " ");

}

 

7.int m=1, total=0;

while(m<9){

 total=total+m;

 m++;

}

System.out.print(total );

 

8.int k=5;

String s="";

while(k>0){

 s=k+" "+s;

 k--;

}

System.out.print(s);

  

9.int b=3;

String list="";

while(b<10) {

 b=b+2;

 if(b%2==1)

  list=b+" "+list;

}

System.out.print(list);


10.int num = 15, MAX = 20;

do 

num = num + 1; 

System.out.println (num); 

} while (num <= MAX);


11.int num = 15, MAX = 20; 

do 

{

num = num + 1;

if (num*2 > MAX+num)

System.out.println (num);

}

while (num <= MAX);


Create a program that will compute the 1st quiz 11/11 2nd quiz 15/15 and the 3rd quiz 20/20 with 10% of quiz and compute the online laboratory 1st 15/20 2nd 10/20 3rd 5/20 with 30% of online laboratory and compute the exam with 20% 1st exam 30/50 2nd exam 45/50 3rd exam 20/50 and compute the quiz+online+ exam1+exam 2+ exam 3


Octal number system has been popularly used as a potential number system in computing texts,


graphics, and especially file protection systems in UNIX operating system. Develop a C- script that


takes a decimal number as an input and produces its equivalent octal number.


[DoB]10 = (----)8


DoB: Date of birth


Note : Don't use array, do with loops

LATEST TUTORIALS
APPROVED BY CLIENTS