Thread: Functions with no returns

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    3

    Question Functions with no returns

    Hi,
    can someone please give an example on how to code this exercise?

    1-The funtion should receive an array of floats and a scalar float (call it "scalar"). It should then print all the elements in the array greater than "scalar".

    Even if it doesn't work can someone atleast show me how the code should look.

  2. #2
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    522
    You should write some code of your own first and if that doesn't work then post it and ask for help, you'll learn much more trying
    things out for yourself. and besides haven't you read the homework rule.
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I feel like making my tag line read:

    "Read the god damn homework rule! Thanks."

    Quzah.

  4. #4
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    522
    lol quazh, you should create a text file of pre-written responses and just post those, it'd save you much typing.
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  5. #5
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Me too! Me too! <POOF>

    Quzah.
    Last edited by quzah; 11-04-2001 at 07:49 PM.

  6. #6
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Very Well, then...<POOF>
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Is it legal to have functions within functions?
    By Programmer_P in forum C++ Programming
    Replies: 13
    Last Post: 05-25-2009, 11:21 PM
  2. Functions are Still Not Understood.
    By errigour in forum C Programming
    Replies: 6
    Last Post: 04-09-2009, 02:54 PM
  3. An array of macro functions?
    By someprogr in forum C Programming
    Replies: 6
    Last Post: 01-28-2009, 07:05 PM
  4. calling functions within functions
    By edd1986 in forum C Programming
    Replies: 3
    Last Post: 03-29-2005, 03:35 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM