My code has the following:
- a function with the prototype: "void mat_out(double a[][10], int m, int n, char * title);"
-within my main function i have "mat_out(inv, m, n, "Inverse");"
-within...
Type: Posts; User: alexpos
My code has the following:
- a function with the prototype: "void mat_out(double a[][10], int m, int n, char * title);"
-within my main function i have "mat_out(inv, m, n, "Inverse");"
-within...
I developed an algorithm to calculate the solution to equations by augmenting a matrix of coefficients with an identity matrix and then finding the inverse. So:
[A | I ] ---> [I | A-1 ]
...
Okay..
Yet i still don't understand how "variable values are passed from one function to another".
Anyways, i understand this task in the following fashion. I replace all the main parts of...
I am instructed to do the following:
However, I'm not sure what the assignment means. Firstly, is "passed" supposed to be "past"?
Also, what does it mean to "return a possibly modified...
The code works on another system, but when run on another computer (and possible an older compiler), the program either runs in an infinite loop or does not recognize the redirected input file.
...
Another question, what does "modular fashion" mean in regards to a written code?
I seem to have fixed it:
#include <stdio.h>
int main()
{
int prod_num, number, counter=0, major_code=0, minor_code=0, tax_code=0, manuf_code=0;
double base_cost, minor_factor=0,...
The code does seem to read the input text correctly now.
However, the calculated total price is wrong. Actually, it's a completely random huge number. Any ideas?
I was told that i must...
The following code reads a file containing (on each line): Code, Price, Amount. Then it calculates taxes, shipping costs, etc. and consequently, the grand total of each purchase (or each line). At...
Suppose i have an 8 digit code. I want to assign first 'x' digits to represent the first code. The 'y' digits after x i want to represent a different code. And so on.
So for a specified number. I...
Problem fixed!.
Problem fixed!.
Thank you for the replies.
When the following code is outputted, the total hours and the gross pay appear as huge numbers.
For example, this is the code:
#include <stdio.h>
int...
What does it mean to equate scanf statements to a value.
if ( scanf("%lf", &num_hours) == 1)
and
while ( scanf("%d %d %lf", &emp_num, &num_shifts, &base_rate) == 3 )
I really appreciate it everyone (especially Dave), but i want to try to write with my own method. Your program Dave, believe it or not, is confusing for me, since i only know the very beginnings.
...
There is no need for me to use the 'file open' commands. I can just use my compiler's option to input data from a file. That's no longer a problem.
The problem comes in when i'm told to read a...
Also, can someone please explain the following code to me (in particular, the bolded parts):
#include <stdio.h>
int main() {
FILE *file;
int numbers[30] ;
/* make sure it is large...
The following code, Ancient Dragon, will give me an error "access Violation".
#include <stdio.h>
int main()
{
int emp_num, num_shifts;
double base_rate, num_hours;
FILE* fp =...
I have to write a program which processes data from a file (employee number, number of shifts, base wage, and the number of hours worked), and then calculate several things and consequently print...