As you can see the variable's data type is real, this allows the program to recieve numbers with fractional parts, and print out an accurate result. The program will show the result in scientific notation, this can be removed by writing :0:0 next to res.
writeln('The result is equal to', res:0:0);
You should play around with this information for awhile, don't start using logical operators just yet, we'll leave those for Control Structures (module 3).
0 comentários
Posts a comment