Prompt the user to enter a positive integer

Assignment Help JAVA Programming
Reference no: EM13850012

Description:

Create a project called Daily8. Add a C source file to the project named daily8.c. Write a program that  will prompt the user to enter a positive integer. Your program should then call a function that you write called loop_down_to_zero that takes one argument of type integer and will use a while loop as we did in class to print all of the integers from the number entered down to and including the number zero with
each number appearing on one line.

Next you should print one line containing four asterisks and a new line.

Finally your program should call another function that you write called loop_up_to_int that takes one argument of type integer and will use a while loop as we did in class to print all of the integers from zero up to and including the number entered from the keyboard.

Please note that you may NOT use recursion in this program, you must use a loop. Your functions may not call themselves.

A sample run of the program is given in the screenshot below:

2449_sample run of the program.jpg

At the top of your program you should have a comment section that follows the below format:

***********************************************
Author: Dr. Lin
Date: 9/19/2015

Answer to question: <Insert the answer to the following question: What happens if COMP 91.101 (201, 202, 204) Assignment 08, 09-21-2015 F15 - Dr. Lin the integer that you type is again big?

Say 10000 (or 300000 in Mac)? Why is this behavior different than what you sawwith your daily7?>

***********************************************/
This is how the output window looks like in Mac:

1046_top of your program.jpg

Reference no: EM13850012

Questions Cloud

The molar heat capacity of nh3 : The molar heat capacity of NH3 (g) at constant pressure in J•mol-1•K-1= 29.75 + 25.1 x 10-3T - 1.55 x 105/T2, where T is the absolute temperature. What is the molar heat capacity at constant pressure at 298K and at 1000 K? What is the maximum value o..
Cost of appliance parts used in providing services to others : The cost of Appliance Parts used in providing services to customers
Support for cloud-based strategies : In this course, you are introduced to general Windows Server concepts like active directory, group policy, security, networking and IIS, access control, and much more. Now that you understand the basic concepts, we will delve a little deeper and l..
How does the right to privacy protect a women''s right : utilize the Constitution, established case law, and scholarly sources to answer the following questions. How does the right to privacy protect a women's right to have an abortion or not?
Prompt the user to enter a positive integer : Create a project called Daily8. Add a C source file to the project named daily8.c. Write a program that  will prompt the user to enter a positive integer.
Define purposeful actors in the international system : What IOs, or kinds of IOs, do you find the most effective or necessary and why. Please mention different types of IOs to explain
Is jci entitled to use the bfoq defense : Numerous women, including a woman who had chosen to be sterilized to avoid losing her job, filed a lawsuit against JCI for sex discrimination. Is JCI entitled to use the BFOQ defense
Demonstrate strong corporate ethics : lease discuss the ethical lessons that you learned in this class that will help you in the future. Research a company that demonstrates strong corporate ethics and discuss why the company is a good example of corporate ethics, leadership and applic..
How miranda vs arizona and subsequent rulings apply : Students will analyze the following fact pattern and discuss how Miranda v. Arizona and subsequent rulings apply. Four police officers storm an apartment of a suspected drug trafficker with a history of illegal firearm possession

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program called gf2java to implement the finite

write a program called gf2.java to implement the finite field gfpn where p is a prime number and n is a positive

  Consumer and business product and discuss

Name a product that could be described as both a consumer and business product and discuss why. Describe its attributes, uses and product perceptions of the customers in both markets.

  Constructing a simple flowchart that describes simple logic

Constructing a simple flowchart that describes simple logic flow through a program. Translating the flowchart into pseudo code. Creating a simple module, based on the pseudo code created in step 2, which accepts a parameter and returns a value.

  Portable file system implement a portable file system with

implement a portable file system with java language. i do have some requirements.implement a portable file system pfs.

  Object from question 1 manage its display

Write a Java statement to have the object from question 1 manage its display area by dividing it into 3 rows which have 4 columns each.

  Sequence of method in vector class

Construct a Vector class implementing a number of vector operations as methods along with a testing program to verify the class is working.

  Conduct an internet search for javadb tutorial you might

please write a 200-400 word response to the following questionq1. conduct an internet search for javadb tutorial. you

  Write an application in which the user can enter a date

Write an application in which the user can enter a date using digits and slashes (for example, " 6/24/2012 " ), and receive output that displays the date with the month shown as a word

  Write the code with comment and output resultinterface and

write the code with comment and output resultinterface and polymorphismimplement a class quiz that implements the

  Write a graphical user interface class

Write a graphical user interface class called SentenceCounterGUI. It should be able to manipulate the sentence of words and have the behaviour label.

  Build distributed applications using technologies

Build distributed applications using technologies like Unix and Java sockets, SUN RPC, Java RMI, and message-passing tools such as PVM and MPI and

  Write prolog clauses to express therelationships

Write prolog clauses to express the following relationships, given the parent relationship: grand-parent, sibling, cousin.

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