hi, i am currently doing a java simple calculator parser, that will deal very simply with + and - operators only and numbers only and also ( and ) , i have read about
http://scriptasylum.com/tutorials/infix_postfix/algorithms/postfix-evaluation/index.htm
http://scriptasylum.com/tutorials/infix_postfix/algorithms/infix-postfix/index.ht...
I'm part of a group of students, trying to Build a E-Ticketing Gateway for a Cinema Company. We are fairly good with the basics (we've done a few portals for schools). But none of this involved any money transactions.
So I decided that before jumping in I should get a few pointers from the people who've actually done this before.
What ...
Dear Folks,
One of my students asked me this kind of homework with C++ arrays. It seemed quite interesting for me, so, though I have solved this problem, I wanted to share my solution with you and know another variants and opinions. The problem is following:
Problem
It is given a 2D dynamic quadratic matrix (array) A(nxn). It is require...
program will read input and
directives from a file. The input describes a time sequence of
events that occur. These are the full set of events you will simulate:
cpu - The processor runs for 1 time step the currently running process
new - A new process is created
done - The currently running process has finished
wait X - T...
In a company, there are three categories: A,B,C.
They want to give an increment. So if category C gets N% as increment. category B gets 2N% as increment and category A gets 3N% as increment. But the increment should be atleast 1% and The total updated salary should not exceed $50,000.
Print the increment and the total update...
If entity x is existence-dependent on entity y then what is x said to be?
a. Dominant entity
b. Subordinate entity
c. Primary entity
d. Secondary entity
What can be the right ans select?
...
Hello all, I want to copy a single file, fairly large (+100MB) using CreateFile(), ReadFile(), and WriteFile().
My program successfully copied text file and other small file (in the range of KBs), but when I wanted to copy a 160 single .EXE file, it crashed and the debugger said "Stack overflow"
...
My college's lecturer gaves me an assignment and there's a question as follow
A DRAM has 11 multiplexed address pin and one data input/output pin. 14-non multiplexed address pin and 4 data input/output pin Determine the organization of the DRAM
I'm currently stuck on this question,I've been googling for an hour trying to know what is...
This is a simple math question to which I had an answer a long time ago but that doesn't come to mind immediately right now.
Using the picture attached, how would I prove that a*b = c*d
...
An emirp (prime spelled backwards) is a pime number whose reversal is also prime. Ex. 17 & 71. I have to write a program that displays the first 100 emirps. It has to display 10 numbers per line and align the numbers properly:
2 3 5 7 11 13 17 31 37 71
73 79 97 101 107 113 131 149 ...
When I use the code recommended in the book, I get an error. I am using NetBeans 6.8 for Mac.
Here is the code:
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream inputFile;
int number;
inputFile.open("MacintoshHD/Users/moshekwiat/Desktop/random.txt");
inFile >> number;
cout<<endl <<number...
This is a function that returns the minimum doctor id from doctor table after accepting a string s that is a consultation field in patient table. for eg , if in the form i wrote " cardiology", then it will return the minimum doctor id relating to the that field.also a doctor is free or not is decided by its current status. by default its...
Hi,
I am using the following code:
#include <stdio.h>
#include <iostream>
using namespace std;
int main ()
{
char c ;
c = cin.get() ;
do {
cout.put(c) ;
c = cin.get() ;
} while ( !cin.eof()) ;
cout << "coming out!" << endl;
return 0;
}
Problem with the above code is, its not getting out of l...
I am developing a simulator for a machine. It reads a file in, stores it in a string (as a binary number) to an array that is supposed to simulate the memory of a computer. Then it gets passed to an interpreter that takes gets the first element of the array, and based on the first 4 characters it gets sent to another class.
An example o...
What code do we use to move at a point on the screen in graphics mode(graphics.h)?As in normal we use goto(x,y).
...
My program is reading numbers from a file- and it reads the last number twice. What is wrong with my program and what can I do to fix it?
int main()
{
ifstream inputFile;
int number = 0; //the input for the numbers in the file
double total = 0; //the total of the numbers
double counter = 0;//number of numbers
doubl...
How come void del_begin() crashes when there's only one node left (I have other functions to add nodes)?
#include <iostream>
using namesspace std;
node *start_ptr = NULL;
node *current;
int option = 0;
void del_end()
{
node *temp, *temp2;
temp = start_ptr;
if (start_ptr == NULL)
cout << "There are no nod...
This is the expected output:
We are to make a C program that calculates for the Fabonacci Sequence.
We're only allowed up to 3 variables and we're NOT allowed to use loops.
And I don't know what to do and how to start.
I hope you guys can help me. :/
...
hi,
i have this homework problem where i need to use regex to remove every other character in a string.
in one part, i have to delete characters at index 1,3,5,.... i have done this as follows:
String s = "1a2b3c4d5";
System.out.println(s.replaceAll("(.).", "$1"));
this prints 12345 which is what i want. essentially i match two char...
Hello,
I'm writing a Connect4 game with an AI opponent using adversarial search techniques and I have somewhat run into a wall. I feel that I'm not far from a solution but that there's perhaps a problem where I'm switching perspectives (as in: the perspective of which participant I'm basing my evaluation scores on), missing a minus sign...