|Are you writing in C or C++? It seems you are using C style |
programming, but using a C++ compiler, and getting
To use C, the header file is not <cstdlib> but <stdlib.h> and
<iostream> is available only in C++. You haven't included the
header file required for printf and scanf. Look these two
functions up in your reference material, and see what header
you need to include.
"using namespace" is a C++ statement, and not valid in C. If
you rename your source file to a .c extension, you'll get a
syntax error message if you use C++.
Your task is to input "real" numbers. This implies either
double or float, but not int. (Unless it means real as opposed
to imaginary or complex, but I doubt it.)
If you are going to use float instead of double, you will need to
adjust the first argument to scanf, to tell it that you are
assigning to a float. Note that you don't need to change the
specification for printf (unlike scanf). Extra points (to your own
self-esteem at least) if you can find out why.
Finally, you asked why "df" doesn't work. In what text book or
reference guide did you see "df" mentioned?