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 java classes for the class diagram

Write Java classes for the class diagram. You don't need to write any set and get methods for simplicity.

  The desired functionality is for your programs to input

the desired functionality is for your programs to input pairs of natural numbers as theyre entered by the user until

  Determine statistics for a video game tournament

Write a program to determine statistics for a video game tournament and write a program to alphabetize a list of last names. The user will input an undetermined number of last names.

  Produce a fully functional gui program

Produce a fully functional GUI program in accordance with the specifications mentioned below. The program will be used to determine and display the final mark of students

  Java coding if-else while loop

Code a while loop that keeps printing "You are a DEDICATED student!" as long as the user enters an attendance rate of 90% or greater. Assume the loop-control variable, attendance, is already declared along with input for the Scanner class. The w..

  Huge integer class

Huge Integer Class) Create a class HugeInteger which uses a 40-element array of digits to store integers as large as 40 digits each. Provide methods parse, toString, add and subtract. Method parse should receive a String, extract each digit using met..

  Design a war game that you can play against the computer

Create a Card class to store a single playing card.  Create a class called DeckOfCards that stores 52 objects of the card class.  Create appropriate constructors and methods for each class that allow for the following requirements.

  Write a program that reads in the file

Write a program that reads in the file and exports it to a standard CSV format. For the records above, the output format would be Freddy Kruger, 1313 Mockingbird Lane, Houston, Texas Billy Thornton, 1010 Slingblade Street, Houston, Texas

  Compare and contrast the treatment of war

Compare and contrast the treatment of war in O'Brien's "The Things They Carried" and Frank O'Connor's "Guest of the Nation." 3-5 page MLA Format

  Write a program to print all of the permutations

Write a program to print all of the permutations of the values 1, 2, 3, ..., n - Your program takes one argument from the command line, which as an integer n  that is the number of elements.

  Java class library with thousands of predefined classes

The Java Application Programming Interface is a Java class library with thousands of predefined classes

  Create dynamic web applications using javaserver pages

Analyze, design, develop, test, and deploy small-to-medium-scale Web applications and Create dynamic Web applications using JavaServer Pages (JSP) technology and Java Servlets

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