A computer program is a collection of instructions that can be executed by a computer to perform a specific task.
A computer program is usually written by a computer programmer in a programming language. From the program in its human-readable form of source code, a compiler or assembler can derive machine code—a form consisting of instructions that the computer can directly execute. Alternatively, a computer program may be executed with the aid of an interpreter.
A collection of computer programs, libraries, and related data are referred to as software. Computer programs may be categorized along functional lines, such as application software and system software. The underlying method used for some calculation or manipulation is known as an algorithm.
I need to write a MIPS program (using only 2 true-ops) to take in 1 signed integer argument into register $a0, and return (into $v0) a 1 if the input was negative, and a 0 (into $v0) otherwise. Can anyone offer help. I'm not sure since I can only use 2 instructions.
I am in my first year at the university as a Bachelor of the Arts student rather than as an engineering student. Though I may be able to switch in my second year, this isn't likely given the first-year course load in the engineering school. If I were to get the B.A., would I be able to enter a...
Write a program to input a whole number n using the Scanner class. If the number is less than 0, your program should print an error message. If the number is 0 or 1, the actual number should be printed. If the number is greater than 1, compute the sum of all integers between 1 and the given...
Homework Statement
It would help if you guys had access to Maple
Anyways here is the problem: http://poibella.org/calc3f11/wp-content/uploads/2011/09/lab_3_vector_calc_F_11.pdf
It is on question 12 asking for flux and the questions after that.
Homework Equations
In the link
The...
Homework Statement
Adjust a program loop so frequency will change linearly with a keyboard increment or decrement.
The current calculation adjusts about 40 counts in the delay loop but when the frequency gets high the step is frequency is very large with each decrement in the loop.
A...
Perfect Number Program Java Methods
A perfect number is a positive integer equal to the sum of all its divisors (including 1 but excluding the number itself). For example:
28 = 1 + 2 + 4 + 7 + 14
According to Euclid, any solution to (2n-1) that results in a prime number will indicate that...
need simulate program for fresnel biprism diffraction(urgent)
Dear friends
I am student learning phyisics (8th term or 4th year) this is my last term and I have optic
My teacher told us that he want some programs to simulate some optice expriments like : prism - young expriment - loid...
Write a program that prompts the user to enter the resistance of each resistor continuously by using a while loop until a zero resistance is entered and store it in an array, then calculates the equivalent resistance R. Also count the number of resistors n. Test your program with R1 = 1 kΩ,R2 =...
Homework Statement
Write a program that takes a file name as argument and counts the number of words and the number of characters (without spaces) in the document.
Homework Equations
The Attempt at a Solution
How exactly should my program take a .txt file as an argument? Do I simply:
String...
Hello. I have the distance formula programmed into my calculator and I searched for a distance formula that includes the z-axis but I couldn't find any. Does anyone know how to make such a program for the TI-84?
Thank you.
I'm a second year Comp E student, and in an intro class we're learning 8085 assembler. The professor wrote his own simulator for the class, but it's kinda buggy and I feel like it's been given minimal updates since he wrote it some 15 years ago. I was looking for a programming project, so I...
Homework Statement
How do I erase previous lines displayed from printf function? (use printf, scanf etc)
Welcome to Sample Program
[Press Enter to Start]
When I press Enter, the [Press Enter to Start] should disappear.
Homework Equations
- nil -
The Attempt at a Solution...
Homework Statement
Write a Java program to solve the following problem.
An elastic rope starts out with length 100 meters. The start of the rope is fixed to a pole and a worm is placed on the rope at the start and the worm starts crawling towards the end. Each day the worm crawls 6 meters...
Homework Statement
Homework Equations
The Attempt at a Solution
public class Caesar
{
public static void main(String[] args)
{
int k = Integer.parseInt(args[0]);
char c;
String strMsg = StdIn.readString();
System.out.print("Encrypted sentence is: " );
for (int i = 0; i <...
I want to use StdIn and StdOut in my program as instructed. Our teacher told us to put the StdIn.java file inside the same folder as the source file (the program I am writing). But that is not working. Always gives me an error when I use the commands.
Am I doing it wrong? Is there another way...
I am comparing LP's and SDP's and have come across a lot of papers where they show all of the differences, but I am trying to put an lp is sdp form. The reason being I have solved an advanced sdp using an online solver and can solve basic/advanced lps on my pc, but I now want to take a lp and...
Hey guys, I recently tried to program something to convert cartesian coordinates into spherical coordinates. I have been using the TI-89 Titanium and my limited programming ability to program it. I know of the temporary input function where x^2|x=2 makes the output 4, but how do I input multiple...
Did anyone write a program before for Newton Raphson method on MATLAB.
I need to try the program to solve 2 equations:
cox=x^3
and x^4-0.5(x^3)+3(x^2)-x+3=0
Please Help me in this manner ASAP.
AND THANK YOU
Homework Statement
Write a method isPalindrome that accepts a string as argument and returns true or false
indicating if the string is a palindrome or not. A palindrome is string that can be read the same way forward and backward. Your method must handle upper and lower case characters (the...
Hi everyone,
I was wondering if anyone had or knew where to get a good FEA program for my ti89. My homework has begun to take forever what with defining mass matrices and all this nonsense.
Any help at all would be much appreciated!:smile:
here is
import java.util.*;
public class oddNumbers
{
public static void main(String[] args){
System.out.println("enter two number");
Scanner kb=new Scanner(System .in);
int number=kb.nextInt();
int number2=kb.nextInt();
int s=number2/2;
String decision...
Hi!
I've never done any programming in fortran and got stuck trying to test run a program.
Note that I am not learning how to program in fortran, this is for an astrophysics course.
Basically what I need is an instruction how to run a fortran code if I have some .f files and .o files as well...
I'm new to programming. my assignment wants me to create a program using c++ that can find the square root of any number using Newtons Method.
The user has to enter a number (y) and the program has to calculate the root and has to show each iteration. the initial guess (x0) has to be y/4...
Involves physics but I have to program, can't figure out equation!
Homework Statement
Imagine an experiment performed on an infinitely long “billiards” table. This table is bounded at the far side and the near side, and these sides are a distance w apart. A ball (of diameter 0) is adjacent to...
I have already completed all my core courses, and more than minimum requirements (bunch of courses in Operations Research and Transportation Systems). However, it always seems to me that there is just more stuff I want to keep learning (mostly in Applied Math). I usually don't take more than one...
Hi,
I'm an international student and I'm looking to apply to a few colleges in the USA. However, due to the random nature of the admissions process, I may or may not get in. Experience has taught me that I have to think of a rough course of action in case things don't go as I would like them...
I plan on applying for an REU program this summer. I know my research mentor will write a very good recommendation, and is well-known in the field. However, I have no other connections. The applications are due in March, so I think I shouldn't place too much stock in next semester's...
Homework Statement
Ok, I just finished my code for my program. And its not compiling, and I am not sure what's wrong.
Below is an image of the errors and the code.
http://i55.tinypic.com/in8x0y.png
And my full code is below here:
MOD NOTE: I indented the code below to make it...
Hi :)
I'm taking my first java course. I took two C++ courses last year, and I understand OOP pretty decently, but I cannot get this java program to work! And I'm beginning to get really frustrated because I can't find my mistake.
This is my class file:
package studentsjav;
__________...
The title says it all, but I am going to introduce myself first.
Right now, I am pursuing (and enjoying) Bachelor's degree course in Mechanical Engineering from Jadavpur University, Kolkata, India. It has just been a little more than 2.5 months since I joined college. I have been dreaming to...
Homework Statement
Ok, so masteringphysics has rejected an answer I think is right. The question is set up with "insert value" and then "insert units"
Heres the question.
A 5.00 kg crate is suspended from the end of a short vertical rope of negligible mass. An upward force F(t) is applied to...
Hey everyone, I am a 1st year student with junior year standing in math and physics at univ. of Kansas and I just wanted to see if I have enough qualifications to have good chances at REU progrmas in math/physics for next summer.
In math, by the end of this year, Ill have had 2 semesters of...
Homework Statement
Write a C++ program to determine and print the sum of the series (1/3 + 1/6 + 1/9 + ... + 1/(3*n)) for a given value of n. In case you don't see the patter, the series can also be written as 1/(3*1) + 1/(3*2) +1/(3*3)+ ... + 1/(3*n). The value of n should be given...
Okay.
So, I'm taking up a beginning Java course in college and we have been assigned a rather simple (?) homework.
We have to code a program that prints a statement a thousand times, but without the use of loops, only methods. I know I can create a method that contains a number of the...
This is an extremely speculative post. I came to know through a friend of mine, that his professor told him that CERN is going to announce by spring 2012 the closure of all Higgs and Supersymmetry related programs. I do not have any citation for this claim. More knowledgeable people can tell me...
I've heard that some employers/universities look down upon going to the same Undergrad as grad institution (unless the program is top ranked, or circumstances, etc) but what about going to a different university campus within the same university system?
I would see nothing wrong with that...
I'm currently in my first semester of a physics PhD program, straight out of undergrad. At the end of my senior year of undergrad, I was already feeling burnt out and tired of course work, but my profs pushed grad school as the smart and best choice. So I went.
Since I moved here (14 hours...
Hi guys, I am trying to figure out what Applied Math PhD programs I should I apply to this fall. My main interests are in computational science, specifically numerical methods and stochastic methods.
My profile is as follow:
Undergrad: big state school, solid reputation in math
Major...
I wrote a program to read a txt file. When its running, system appear "Segmentation fault <core dumped>"
the code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define BUF 1024
#define pi 3.14159
typedef struct skymapdata
{
double ra;
double dec;
double p...
Need help writing C++ program that counts non-whitespace characters...?
Homework Statement
Here are instructions...
Write a program - stored in the file charcounter.cpp - that will read and count non-whitespace characters from the standard input stream - until some special character is...
Homework Statement
Its a simple temp conversion program.
NOW, my problem is when ever I enter a temperature to convert, it just keeps repeating NON stop until i hit ctr-C - Here is the code below. What am i missing and how do i fix this little error?
/ This program ...This program...
SUBROUTINE STIKA (X,N)
DIMENSION X(N)
IF (N. LT. 2) RETURN
DO 20 I=2, N
DO 10 J=1, I
IF(X(I) .GE. X(J)) GOTO 10
SAVE = X(I)
X(I) = X(J)
X(J) = SAVE
10 CONTINUE
20...
I'm getting bombarded with trying to understand the epsilon delta proof. I'm also getting killed in fields and proving things in that class. The only ones i feel like i have any chance are my computer science classes and discrete math class. What do you guys recommend me? I'm not particulalrily...
My HP printer installation program cannot see the printer!
I have a HP All In One 7400 office jet and is working for many years. It only work with XP only. I have had no problem installing this into many computers and late as a week ago. But all of a sudden, when I try to install the printer on...
Has anyone tried Victor Stenger's "MonkeyGod" toy universe program?
I haven't yet.
http://www.colorado.edu/philosophy/vstenger/Cosmo/monkey.html
I heard about it on the Cosmic Horizons blog:
http://cosmic-horizons.blogspot.com/2011/09/peer-review-fallacy-of-fine-tuning.html
which was...
Homework Statement
I have to write a program that takes in a file that looks like this:
3424: 313
4334: 543
etc.
and sorts the numbers on the write. Everything for getting the file into an array was done for me so I know it's correct. I'm having two strange problems. First, whenever I'm...