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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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