1,486 Answered Questions for the topic computer programming
10/01/19
Java Switch Case
Why is the output of the code 14, not 8 : alpha=3+5=8?public class Application4{public static void main(String[] args) {int alpha=3;int beta=5;switch (beta){case 3:alpha=alpha+3;case...
more
Computer Programming Computer Science
09/28/19
how do I find the total cost of four years’ worthof tuition after the tenth year (11thto 14thyear).
#include <iostream>#include <iomanip>using namespace std;int main(){ double initialTuition = 10000; double theRate = 0.05; double startOfFourYearTuition = initialTuition; ...
more
09/24/19
I need a good explanation for this problem please
We’ll call a set of numbers un-average if the average of any two numbers in the set is not in the set. So {1, 3, 6, 7, 10} is un-average, but {1, 3, 6, 7, 9} is not. What is the largest set of...
more
09/23/19
anyone can help me with this problem with some explanation
We’ll call a set of numbers un-average if the average of any two numbers in the set is not in the set. So {1, 3, 6, 7, 10} is un-average, but {1, 3, 6, 7, 9} is not. What is the largest set of...
more
Computer Programming Computer Science
09/20/19
How do I get the company name to show all of it?
My output:Enter the name of the companyEnter shares of stockEnter purchase priceEnter sale price Company: "Still"Expected Output (should look like)Enter the name of the companyEnter sale price...
more
Find the next two terms of sequence
U0 = 1U1 =3And Un is defined by Un+2 = 2 * Un+1 + 3 * UnFind the next two terms
Computer Programming
09/12/19
program that can change all string input into A except the middle input
Example:Input: bears Input: moneyOutput: AAaAA Output: AAnAAJAVASCRIPT please help me!
Computer Programming Math
09/02/19
Prove that every convergent sequence is bounded. Is converse true? Justify by giving an example
08/27/19
In how many ways “ n ” toys can be distributed among 3 friends so that there is not more than one winner and all of them contain at least one toy?
In how many ways "n" toys can be distributed among 3 friends so that there is not more than one winner and all of them contain at least one toy?Explanation:For n=5 , We can distribute in the...
more
Computer Programming
08/25/19
How can I have an access to array elements from array of arrays?
Int a1= {1,2};int a2= {2,3}; int a3 [] [] = {a1,a2}; int r=(int) (Math.random() *a3.length); how can I have access to that a3 [r] stored in another array? Like-for (int p:a3[r]) {SOP(p);} how can I...
more
08/20/19
How do I setup GitHub Desktop to ignore Unity build files?
What is the best way to access the GitIgnore file and what patterns should I use to ignore Unity build files?
Computer Programming Browsing Habits
08/04/19
How would you change your everday browsing habits
08/02/19
Learning garbage collection theory?
I want to learn the theory behind garbage collection. How do i go about it? The obvious answer is - a compiler textbook... The question is, is it necessary to learn lexical analysis, parsing and...
more
Could a truly random number be generated using pings to pseudo-randomly selected IP addresses?
The question posed came about during my comp sci lecture while discussing the impossibility of generating numbers in a deterministic computational device.This was the only suggestion which didn't...
more
Computer Programming Theory
08/01/19
Most difficult programming explanation?
Recently I tried to explain some poorly designed code to my project manager. All of the manager classes are singletons ("and that's why I can't easily change this") and the code uses event...
more
Help Understanding Big O
I'm asking more about what this means to my code. I understand the concepts mathematically, I just have a hard time wrapping my head around what they mean conceptually. For example, if one were...
more
08/01/19
Understanding "randomness"?
I can't get my head around this, which is more random? rand()OR rand() * rand() ?
08/01/19
Where do I start learning about image processing and object recognition?
I'm interested in writing some basic computerized object recognition application, so I figure I need some theoretical background in image processing algorithms, along with some AI for decision...
more
08/01/19
Text editor theory?
As I'm always dissatisfied with existing editors, a project I always wanted to start is my own text editor. However doing text editing is serious business.Besides analyzing the source code of...
more
07/31/19
What is Turing Complete?
What does the expression "Turing Complete" mean? Can you give a simple explanation, without going into too many theoretical details?
Database Internals - Where to Begin?
So lets say that you want to learn some stuff about database internals. What's the best source code to look at? the best books to buy?I was talking about this with a buddy the other day and he...
more
07/29/19
Purpose of singletons in programming?
This is admittedly a rather loose question. My current understanding of singletons is that they are a class that you set up in such a way that only one instance is ever created.This sounds a lot...
more
07/29/19
What is starvation?
In multitasking systems, some abnormal conditions prevent progress of executing processes or threads. I'll refer to both processes and threads simply as "processes". Two of these conditions are...
more
07/29/19
Which is the fastest way to get the absolute value of a number?
How fast is an `if` (and why please). My college programing professors always told me to avoid `if`s for they are extremely slow, but I always forgot to ask how slow and why.
07/28/19
Difference between user-level and kernel-supported threads?
I've been looking through a few notes based on this topic, and although I have an understanding of threads in general, I'm not really to sure about the _differences between user-level and...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.