Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. R

    Can't find my mistake

    The calc_vle function takes an element of temperature array and calculates a value of x. The unique value x goes through an iteration until it's condition equation is satisfied. Then x is written to it's own arrray. Everything about the function is executing correctly except writing the iterated...
  2. R

    Unused variable warnings- type pointer

    I am using pointers, in part, to modify variables passed to functions by reference. The compiler generates warnings of unused variables that I believe I am in fact using, though indirectly. I thought I understood how to use and code pointers, at least a little. But evidently not? The program...
  3. R

    Modulo with double and int types

    Trying to generate a list of temperatures that increment by 0.2 degrees in even numbers. The first temperature in the list is the result of a separate function not shown. Always a float but could be even or odd. The objective is to: Trim the first generated temperature to one digit after the...
  4. R

    Loop problems

    It seem the first for loop is not incrementing. Supposed to populate the x1 array with 0 to 1 in 0.01 increments. Then seems like the second for loop is not terminating. Thanks for help/advice. #include <stdio.h> #include <stdlib.h> #include <math.h> #define NUM_MIXTURE_PERCENTAGES 101...
  5. R

    Simple code - best practices?

    Back again :D Bit of a recap: I'm self taught- no mentor, no training. I do this to maintain or maybe even improve mental agility. Most of my coding is straight line number crunching directed toward distillation. In this instance, the input data are imperial units but equations are necessarily...
  6. R

    Else if not returning value

    Where is my function going wrong? Choice 1 returns the correct value of 760 Choice 2 returns an input value of inches properly converted to millimeters. Choice 3 returns an incorrect value of 760. The math for choice 3 returns a correct value as a standalone function The last else if executes...
  7. R

    Accept default value at user input

    Hello again Trying to find a method that when prompted to enter a value, the user presses the 'Enter' key for the program to accept a default value. Apparently there is not a consistent ascii code of 'Enter' that I can use to compare, if I understand it correctly. Here is a snippet of my...
  8. R

    Greetings

    I am recently self taught in the C language and continually learning. I dabble in console application coding for personal use. I'm looking for occasional advice (sometimes more than occasional :)) when I get hung up. Usually I'll solve the problem but when it gets maddeningly frustrating I'd...
  9. R

    Find position of array element

    Function keeps returning a position of 0 (zero) although it should only return zero if wash_abv == the first element. After that the function should return the position of the element that is the lower of the two that wash_abv lies between. Thanks for advice int find_array_pos(double...
Back
Top Bottom