Rewrite the following program segment using while structure rather than a repeat structure?
I need some help with my computer science homework (using Pseudocode) Count ? 1; repeat (print the value assigned to Count and Count ? Count + 1) until (Count = 5)
In what sense do the following three steps not constitute an algorithm?
I need a little help with my computer science homework… Step 1. Draw a straight line segment between the points with rectangular coordinates (2,5) and (6,11). Step 2. Draw a straight line segment between the points with rectangular coordinates (1,3) and (3,6). Step 3. Draw a circle whose center is at the intersection of the previous line segments and whose radius is 2.
Computer Science Homework (in Java) – Strings?
I need to write a program that acts on a String, which I have, but the second part of the assignment is to be able to retain punctuation. The method I’ve written won’t perform the task correctly with punctuation, is there anyway I can take punctuation off, change the String, then put it back on where it was before? I’ve looked at the split method, but I need to keep the punctuation that I take off, and also if the original word is entered in quotes, it needs to output in quotes, which I can’t figure Read more [...]
I need help using arrays on my computer science homework!?
I’m trying to do an assignment in java for my program design class, but everytime I run the program an error occurs. We’re just learning how to do arrays and I’m kind of confused. Here’s the assignment: Write a program that will perform the following tasks in the order given: 1. Ask the user how many random numbers they want to generate (1-100). 2. Generate the specified number of double values and store them into an array. Use this formula to generate the numbers: Math.random()*1000.0 + 17.5 Read more [...]
Computer science homework question ( MC )?
The reason that a(n) ________ cannot be used in a variable name, is that they are used to separate objects, properties, and methods. a. underscore b. comma c. period d. slash
I need you to check my Computer Science homework, please?
I’ve written a program to do as the question asks: “Accept 3 command line arguments and report whether they are in order.” I wrote this: public class ThreeLine { public static void main(String[] args) { int a = Math.min(Integer.parseInt(args[0]) ); int b = Math.min(Integer.parseInt(args[1]) ); int c = Math.max(Integer.parseInt(args[2]) ); System.out.println(a < b && b Read more [...]
i need help with my computer science homework.?
This has to be in java code so c++ doesnt help. 1) create an array, have the user input 20 integers into this array, then print this array. 2) print the array backwards. 3) the code will output how many duplicates the array contains. for example… 2 – 5′s , 4 – 7′s , and 3 – 11′s. ///////////////////// So there are 3 outputs. 1) the original array. 2) the array backwards. 3) the duplicates. This has to be in java code so c++ doesnt help. 1) create an array, have the user input 20 integers Read more [...]
I really need some help getting started on my computer science homework. algorithms.?
Work this algorithm, first with x=4 then with x=9. Can you determine what this algorithm does in general? 1. Read a number, call it x. 2. If the value of x is less than zero, stop-no answer is possible. Otherwise, continue. 3. Set s to 1. 4. Set i to 3. 5. Calculate: t=(s+(x/s))/2 6. Set s to t. 7. Decrease i by 1. 8. If i is greater than zero, go back to step 5. Otherwise, continue to step 9. 9. Print the value of s. hm, so i started to work on this and i was wondering what the hell Read more [...]
So! Who wants to help me with my AP computer science homework?!?
Any takers!? Yay Java!
Recent Comments