1415 Shares

How do i do this computer programming problem? its simple if u know wat ur doin?

How do i do this computer programming problem? its simple if u know wat ur doin? Topic: How to write a loop in java
May 26, 2019 / By Anise
Question: Write a Java program called CountSum that finds the sum and average of numbers that the user enters. The program will first ask for how many numbers the user wants to enter. Sample Execution (user input in bold) How many numbers do you want to input? 5 Enter number 1: 10 Enter number 2: 8 Enter number 3: 4 Enter number 4: 2 Enter number 5: 6 There were 5 numbers. The sum is 30. The average is 6.
Best Answer

Best Answers: How do i do this computer programming problem? its simple if u know wat ur doin?

Wilmot Wilmot | 9 days ago
These are your steps: Using a Scanner for user input (look it up in the Java API), -get the number of ints the from the user -use a for loop to get the numbers from the user. The for loop header will look something like this: for(int i = 0; i < numInts; i++){ //get number from user } -use a for loop to sum the numbers -use the result from above to fnd the average.
👍 166 | 👎 9
Did you like the answer? How do i do this computer programming problem? its simple if u know wat ur doin? Share with your friends

We found more questions related to the topic: How to write a loop in java


Wilmot Originally Answered: So, computer programming. What should I do?
Since you're going to have to write some programs, I suggest you start by learning programming. (Programmers tend to be very logical, even about real life problems.) That means http://www-old.oberon.ethz.ch/WirthPubl/AD.pdf (Wirth is a genius, and this is about the best programming course ever written. And it's free.)
Wilmot Originally Answered: So, computer programming. What should I do?
Maybe want to learn something a lot simpler, like ps1. You will need a powerful computer to pull the ps3 emulator off.
Wilmot Originally Answered: So, computer programming. What should I do?
i would start with gameboy stuff as there are sooo many emulators of those. a ps3 emulator will require wayy to much stress to attempt. read up on the problems of even making games for the ps3. apparently ps3 is a very complicated system.

Sennacherib Sennacherib
public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("How many numbers do you want to input? "); int totalInput = sc.nextInt(); int answer; int sum = 0; for(int x=0; x
👍 60 | 👎 3

Sennacherib Originally Answered: Computer Programming?
To make your own computer. You have to learn electrical engineering both computer programming and electrical engineering are exactly the same thing it requires logic. Your computer that you are using right now just has a billion little switches in the CPU called transistors they have 2 states when its off it stays at 0 when its on it stays at 1 and passes the eletrctial energy now if you setup 6 together and think about it with your brain how would I make it process a LOGIC GATE OR or AND. bascially a computer is only 2 logic gates or and and and is like together. or is like either. and since transistors only use 1 or 0 you could after you get a shitload of transistors in micro form which i doubt you will cuz you need a robotic arm to place em unless you want to make em extremely huge and 6 transisitors will take you a hour just to display 1 letter on screen. did you know that the CPU is a processing unit it processes a bunch of machine codes aka 10101010100101's into different hardwares like Video card = draw on screen sound card = play sound ram = fast memory while computer on harddrive = slow memory while computer on/off all that is controlled by CPU Anyways 1010100101's are wrapped by a general term now called assembly lets say 1110101010101 = ADD 1110101010111 = SUBTRACT 1110101011111 = MOVE etc.. so assembly is just a wrapper for transistor current switching pattern. all it is really is a transfer of energy from parts to part to get something working to built your own computer would take you as long as it took the first person to build his first computer maybe 10 years. Everything nowdays is a team effort you can't do it alone you might not live long enough to even finish it. But coding your own operating system can be done alone no problem. All you are doing when making your own operating system is building a program that runs of the CPU's already given commands a operating system works like this there is a main program called a KERNEL it is competely written in assembly it translates a bunch of commands like ADD SUB MOV PUSH POP into more complex commands like writeStringOnScreen() { .model tiny .code org 100h start: mov dh,12 ; cursor col mov dl,32 ; cursor row mov ah,02h ; move cursor to the right place xor bh,bh ; video page 0 int 10h ; call bios service mov dx,OFFSET Text; DS:DX points to message mov ah,9 ; function 9 - display string int 21h ; all dos service mov ax,4C00h ; exit to dos int 21h Text DB "This is some text$" } Check out http://www.menuetos.net/ its a operating system written in assembly not only KERNEL but competely in assembly I ran it its pretty nice comes with internet/networking/web browser/cd player/game look at source code.. read it.. learn it then attempt your own sure it takes all the fun outta it but its better then wasting time :) P.S. you can't code BIOS its pre-installed into little microchip on your motherboard. Thats why when your computer has a harddrive failure bios still exists and works.
Sennacherib Originally Answered: Computer Programming?
Well, I personally would have a search over the internet. Maybe have a look at a few books and try to find some classes. I wouldn't go to University, and if i did, it would be for some programming course. It sounds like your gonna have to start out by thinking about how you want your computer to run. Find out what 1's and 0's make it do what, and start programming it. If you're doing it from scratch, you're gonna have to make a program that reads files for programs. (Like exe in a windows). Then you'll have to make an operating system. (You can put this straight onto ROM, and what i have already described kinda is this) This project can be a hard one if you've never done something like this before. If i was doing it, i'd only do the OS, which is the main part of the prebuilt system. But it's up to you...

If you have your own answer to the question how to write a loop in java, then you can write your own version, using the form below for an extended answer.