Determine the output of the code sequenc

Assignment Help Software Engineering
Reference no: EM1378920

1. Determine the output of this code sequence? (The user successively enters 3, 5, and -1.)

System.out.print( "Enter an int > " );
int i = scan.nextInt( );
while ( i !=-1 )
{
System.out.println( "Hello" );
System.out.print( " Enter an int > " );
i = scan.nextint ( );
}

2. what are the values of i and product after this code sequence is executed?

int i=6;
int product =1;
do
{
product *=i;
i++;
}while ( i <9 );

3. What is the output of this code sequence?

for ( int i = 0; i <3; i++ )
System.out.println( "Hello" );
System.out.println( " Done" );

4. What are the values of i and sum after this code sequence is executed?

int i = 0;
int sum = 0;
for ( i =0; i < 5; i++ )
{
sum += i;
}

5. What is the value of sum after this code sequence is executed?

int sum = 0;
for ( int i = 1; i < 10; i++ )
{
i++;
sum += i;
}

Reference no: EM1378920

Questions Cloud

Programming frameworks besides asp.net : Name three other web programming frameworks besides ASP.NET. Explain the ways that ASP.NET is different than other web programming frameworks.
Effect of the time step on stability and accuracy : For each case of each method, plot the velocity profile for four difference times on the same graph - Write a code to solve this problem for the schemes and conditions.
Complete life cycle data management : MS Excel is one of the most comprehensive environments for the compilation and interpretation of information. With its information structuring, analysis, and graphing capabilities.
Example of a business related report : Recognize an example of a business related report created with MS Excel. Attach a sample of the report in an Microsoft Excel file.
Determine the output of the code sequenc : Determine the output of this code sequence? The user successively enters 3, 5, and -1.
Calculation of the hypotenuse : Construct a C# console application that calculate the hypotenuse of a right triangle. The calculation of the hypotenuse of a right triangle is based on the Pythagorean Theorem:
Element of array : Discuss how do you access the element of array a located at row two and column four?
Java questions : The linked list that given represents a stack. After we push the player onto the stack, what are first and last items on the stack?
Aspects of software development : Unit testing is the driving technology behind a software design method termed Test Driven Development, which, in turn, is a factor of the agile school of software development.

Reviews

Write a Review

Software Engineering Questions & Answers

  Different approaches for system development

In Systems Analysis and Design. There are at least 2 approaches to system development, variety of life cycles, and long list of techniques.

  Create a communication and sequence diagram

Create a sequence diagram that shows an Owner generating a report regarding the maintenance of their current properties - Create a communication diagram.

  Er diagram to monitor students-write desirable constraints

Represent entire scenario with the help of ER Diagram. Also write desirable constraints and justify your design approach even in a single small step.

  Develop a dtd for catalog of cars

Develop a DTD for a catalog of cars, where each car has child elements make, model, year, color, engine, number_of_doors, transmission_type, and accessories.

  List diffent entities or objects and logical processes

List the diffent entities or objects,logical processes,data flows, and dfata stores that are involoved. starting from the time you submitted your time sheet.

  Design entity relationship diagram for catered accommodation

Design an entity relationship diagram for the case, explaining any suppositions you deem essential for atered or non-catered accommodation at the centre.

  Create flowchart to accept length of base of triangle

Create a flowchart that will accept the length of the base and height of a triangle and print the area. Area of a triangle is : area = 1/2b*h ; where b = base and h = height.

  What is the need to identify test deliverables

What is a test plan? List out the processes that are covered in a test plan. What is the need to identify test deliverables?

  Draw entity-relationship diagram students playing games

Draw an entity-relationship diagram for the following situation: Many students play many different sports. One person, called the head coach, assumes the role of coaching all these sports.

  Design algorithm to find clique in graph

Design an O(n9) algorithm to find a 9-clique in G, if such clique exists; answer "no such a clique" if it does not exist. Please describe your algorithm and sketch its correctness. Pseudocode is NOT required.

  Describe purpose of the keyword super in programs

Describe purpose of the keyword super in programs

  Create state transition diagram that describe patient state

Create a state transition diagram that describes typical patient states and how they change based on specific actions and events.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd