So far I've created an array,
int numTerms[MAX_TERMS]; , but where / how exactly would I update the count?
Type: Posts; User: eeengenious
So far I've created an array,
int numTerms[MAX_TERMS]; , but where / how exactly would I update the count?
After obtaining the number of polynomials, as well as pointers to those polynomials, the following code segment prints those polynomials to the screen:
int displayPolynomial(){
int t, k,...
Right now, I have a polynomial stored as a linked list (struct with element for coeff, element for exponent).
For multiple polynomials, there needs to be a linked list created for each...
Here's my code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#define TRUE 1
Right now, I've read through the file and determined the coefficient and exponent for each term in the polynomial.
I plan to pass these values to a "Build" function which actually builds the...
Program involves File I/O
Example, there's a file with the following:
2 ; number of polynomials
4x^5 - 2x^3 + 2x + 3 ; polynomial 1
8x^4 + 4x^3 - 3x + 9 ; polynomial 2
Have to use a...
Why would that be an issue?
Alright, that works !
Elementary mistake..
Thanks
Hi,
I need help trying to do the following:
Basically, I am trying to count the occurrences of each character in a text file. I'm reading in line by line, and then in each line, analyzing...
Writing Code to Crack a Cipher. It's a sort of interactive game that helps the user crack an encoded text (where one letter of the alphabet maps to another)
Need Help with the "Manually Replace"...
Working with file I/O
Basically, a user inputs a file which they want read. They can enter a sentinel value of "STOP" in which case the program stops.
The program then opens the file, reads...
I have the program working according to all specifications.
Thank you very much for all the help.
It should look like this:
http://i56.tinypic.com/2woccp4.jpg
I'm trying to get the output of the previous Sieve function like this:
Display the final set of prime numbers in a 7 column, table format. The prime numbers must be in descending order with the...
%10d to get the field length of 10
Alright.
Here's my sieve function:
So far got the numbers to print in descending order.
int Sieve (int max_Number)
Haha, sweet, seems to be working.
Thanks for all your help man.
Last thing, I have to return the list of prime numbers in a specific format:
Display the final set of prime numbers in a 7...
Here's what I have:
Getting the error "Expression must be a modifiable lvalue for the 'y' down below:
int main() {
int max_Number;
char Repeat;
Okay, I have it in a do-while loop like this.
Where would the character stuff go?
int main() {
int max_Number = 0;
printf("This program wills calculate all primes up to the number you...
Thanks
Also trying to get it such that the process repeats whenever the user inputs 'Y' or 'y' and quits when 'N' or 'n'
Not sure if I'm going about it the right way, thinking I'm making it...
Oh wow, I didnt know a comma could throw it off.
Thanks.
What would be the proper way to write it?
Valid input for this program is between 2 and 50,000.
However, whenever I try a number less than 2 or greater than 50,000, it still goes through the functions.
What's wrong? Appreciate the help....
Never mind, I figured it out, forgot to initialize sum to 0
A user inputs a number between 2 and 50,000.
Writing a program which utilizes the Sieve of Eratosthenes algorithm to find a list of prime numbers between 2 and the user's input.
I've got the...