functions in C++ - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

functions in C++

albinoesmealbinoesme Posts: 1Member
I am new to programming and I was wondering if anybody could help me out. I am using Bloodshed, and these two problems are really giving me a tough time, I cannot figure them out. Any help is greatly appreciated!

I am to write a function prototype for both of these...

1. A function named check() that has three parameters. The first parameter should accept an integer number, and the second and third parameters should accept variables of type double. The function returns no value.


2. A function named findAbs() that accepts a integer passed to it and returns a double.

Comments

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    [color=Blue]So, did you search anything on the web?
    Prototype in C++ may be in the following form:
    [/color]
    [code]
    (, , etc. ) ;
    [/code]
    Here ai an example of function called [b]foo[/b] - it takes one [italic]integer[/italic] parameter and returns a [italic]double[/italic] value:
    [code]double foo (int);[/code]
  • bbbnnnbbbnnn Posts: 2Member
    This post has been deleted.
  • pseudocoderpseudocoder Posts: 688Member ✭✭✭
    once you've got the requirement... just apply C++ to it. what keyword can you use that is in effect "empty?"

    1) void check(int, double, double);

    2) double findAbs(int);
Sign In or Register to comment.