Question
Hi I need help writting this in Higher Assembly Language. I appreciate the help!
Project 04 2 rite a program to read some numbers. Student Nane Project 3 Enter a positive number, 0 to stop: 45 Enter a posit
Project 04 -Details First print your name, and the project number. See the previous window. - Then prompts and read the numbe
Project 04 2 rite a program to read some numbers. Student Nane Project 3 Enter a positive number, 0 to stop: 45 Enter a positive number. to stop: 6 Enter a positive number. to stop: 23 Enter a positive number. 0 to stop: 3 Enter a positive number, 0 to stop: 90 Enter a positive number, 0 to stop: 56 Enter a positive number, 0 to stop: 87 Enter a positive nunber to stop: 51 Enter a positive number, 0 to stop: 44 Enter a positive nunber. to stop: 49 Enter a positive number. to stop: 65 Enter a positive nunber. 0 to stop: 98 Enter a positive nunber, 0 to stop: 79 Enter a positive nunber. to stop: 0 - The program saves the number into heap memory. - The program stops when oa zero is eniered Program displays the numbers in the order of input in g single line. Make sure that you print top nd bottom lines with your own name with appropriate new lines. (Also see the next slide) 45 67 23 3 90 56 87 51 44 49 65 98 79 Student Name End of Project 3 CS 17, Project04 (w18
Project 04 -Details First print your name, and the project number. See the previous window. - Then prompts and read the numbers. Stay on the same line, i.e., keep prompt and the answer on one line Work with 32-bit unsigned integers. No error checking. Tesi the program with data which are within the limits CMD windows width is small and not expandable. keep your output width under 70 - haracters: 28 30 48 50 68 78 Follow the previous programs style and commenting. CS 17, Project 04 (w18
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include <stdio.h>
void main()
{
int num,a[100],i=0,n=0;
printf("Student Name - Project 3\n");
printf("\nEnter a positive number, 0 to stop:");
scanf ("%d", &num);
while (1)
{
a[i]=num;
printf("Enter a positive number, 0 to stop:");
scanf ("%d", &num);
if(num==0)
{
printf("\n");
break;
}
i++;
n++;
}
for(i=0;i<=n;i++)
{
printf ("%d ",a[i]);
}
printf("\n\nStudent Name - Project 3");
getch();
}

Student NameProject 3 Enter a positive number, 0 to stop:7 Enter a positive number, 0 to stop: 76 Enter a positive number, 0

Add a comment
Know the answer?
Add Answer to:
Project 04 2 rite a program to read some numbers. Student Nane Project 3 Enter a positive number,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Write a program to add positive numbers. Ask the user to enter numbers greater than...

    1. Write a program to add positive numbers. Ask the user to enter numbers greater than zero. If a 0, is entered stop requesting numbers and display the total. If a number is entered that is less than 0, display the message ‘Number must be greater than 0’, then ask for another number to be entered. Repeat until a number greater than 0 or 0 is entered. use math lab so I can copy the answers

  • Written in Java Your job is to produce a program that sorts a list of numbers...

    Written in Java Your job is to produce a program that sorts a list of numbers in ascending order. Your program will need to read-in, from a file, a list of integers – at which point you should allow the user an option to choose to sort the numbers in ascending order via one of the three Sorting algorithms that we have explored. Your program should use the concept of Polymorphism to provide this sorting feature. As output, you will...

  • The task involves writing a C++ program that determines the prime numbers between 1 and 100....

    The task involves writing a C++ program that determines the prime numbers between 1 and 100. The steps you should follow to identify the prime numbers are the following. 1. The number 1 is not a prime number, so it should be scratched. 2. Starting from the first prime number, which is 2, you scratch all the numbers that are the multiple of 2. You should not scratch out 2 itself. 3. The next number in the sequence after the...

  • Infinite Spiral of Numbers (due 17 Feb 2020) HELLO, WE ARE USING PYTHON 3 TO COMPLETE...

    Infinite Spiral of Numbers (due 17 Feb 2020) HELLO, WE ARE USING PYTHON 3 TO COMPLETE THIS PROJECT!! PLEASE FOLLOW CODE SKELETON AS GIVEN AT THE END. THIS IS DUE 17TH FEB 2020, ANY AND ALL HELP WOULD BE GREATLY APPRECIATED, THANK YOU! Consider the natural numbers laid out in a square spiral, with 1 occupying the center of the spiral. The central 11 x 11 subset of that spiral is shown in the table below. 111 112 113 114...

  • use java thanks Write a program that prompts a user to enter number of Math question that she wishes the system to gene...

    use java thanks Write a program that prompts a user to enter number of Math question that she wishes the system to generate. The system will random generate Math questions which consisted of ±' , x and / of two positive integer numbers. The sample run programs are depicted as below Sample run 1 How many Math question you want to create? 4 Sample run 2 How many Math question you want to create? 10 4 questions have been created...

  • Use C++ For this week’s lab you will write a program to read a data file...

    Use C++ For this week’s lab you will write a program to read a data file containing numerical values, one per line. The program should compute average of the numbers and also find the smallest and the largest value in the file. You may assume that the data file will have EXACTLY 100 integer values in it. Process all the values out of the data file. Show the average, smallest, largest, and the name of the data file in the...

  • I need it in JAVA Write a program that randomly populates an array of size 100,...

    I need it in JAVA Write a program that randomly populates an array of size 100, sorts it, and then finds the median. The random numbers must be from 0-99 and all integer values. Also since there is an even set of numbers the median is found by taking the mean of the two middle numbers (In other words the 50th and 51st). You have to code your own sorting method. You may not use a built in java sorter....

  • Write a Java program, In this project, you are going to build a max-heap using array...

    Write a Java program, In this project, you are going to build a max-heap using array representation. In particular, your program should: • Implement two methods of building a max-heap. o Using sequential insertions (its time complexity: ?(?????), by successively applying the regular add method). o Using the optimal method (its time complexity: ?(?), the “smart” way we learned in class). For both methods, your implementations need to keep track of how many swaps (swapping parent and child) are required...

  • Using C programming For this project, you have been tasked to read a text file with student grade...

    Using C programming For this project, you have been tasked to read a text file with student grades and perform several operations with them. First, you must read the file, loading the student records. Each record (line) contains the student’s identification number and then four of the student’s numerical test grades. Your application should find the average of the four grades and insert them into the same array as the id number and four grades. I suggest using a 5th...

  • Write a Python program (question2.py) that reads from a file called “input.txt” numbers in [1,39] separated...

    Write a Python program (question2.py) that reads from a file called “input.txt” numbers in [1,39] separated in by commas. The numbers are in [1-99]. The program will then convert each number to a possible Roman Numeral equivalent, and print it on the screen. Remember, I is 1, V is 5, X is 10 For example, if the input is: 23, 11 the output is: XXIII, XI. ROMAN NUMERALS CHART 1 TO 100 69 LXIX 11 2 11 3 III 4...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT