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

  Draw entity-relationship diagram for heg

Instructors are capable of teaching many different courses. Draw an entity-relationship diagram for HEG (in 3NF).

  Explaining software engineering in detail

Select a topic related to some aspect of Software Engineering. Draft a 2500+ word (minimum) paper on that topic - single spaced 12 pt times or times new roman font.

  Identify principle viewpoints of specification of system

Identify the principle viewpoints which might be taken into account in the specification of this system and organize these using a viewpoint hierarchy diagram.

  Challenges and difficulties of applying software metrics

How to execute software measurement? Write dwon challenges and difficulties of applying software metrics?

  Data flow diagram for new customer support system

A context diagram, also called a Data Flow Diagram (DFD), documents the scope of the new customer support system. It focuses primarily on output from the system.

  Create erd using entities and attributes for driver-s log

Create a detailed ERD using the Entities and Attributes for Driver's Log document found on the Huffman Trucking Intranet site.

  Sketch flowchart to print average for student

Sketch a flowchart to print average for each student in class.Input. Input consists of student records each containing student's name(STUDENT-NAME), score for first test(TEST), score for second test(TEST2), and score for third test(TEST3).

  Create a structural model

Structural modeling is a different view of the same system that you analyzed from a functional perspective. This model shows how data is organized within the system.

  Create logic for program that will produce count of readers

Create the logic for a program that would produce a count of readers by income groups as follows: under $20,000, $20,000- $29,999, $30,000-$49,999, $50,000-$69,999, and $70,000 and up.

  Explain how firm testing for each development method

Research, write, and provide a 4-6 page proposal of the alternative methods the firm might consider for completing the Frequent Shopper Program. Explain how the firm would conduct testing for each development method.

  Assign resources to processes for k processes will be active

Given a set of process and resources, set of requested resources for each process, and number k, is it possible to assign resources to processes so that at least k processes will be active?

  Role of systems analyst in system development life cycle

What are the primary responsibilities of a system analyst? What skills do system analysts need? Discuss the role the systems analyst plays in the system development lifecycle.

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