A C program that contain conditional statement, loop statement, and functions.
Make it simple plz
1
Expert's answer
2011-05-23T09:58:20-0400
#include <stdio.h> #include <conio.h>
// Function that prints "Hello World" on console void print_hello();
// Function that computes the cube of the integer long cube(int pNumber);
// Function that defines is the integer positive // (uses the condition statement) int is_positive(int pNumber);
int main() { int i;
print_hello();
// Using the condition define is zero positive number if (is_positive(0) == 1) & printf("Zero is positive\n"); else & printf("Zero isn't positive\n");
// Using the cycle print the cubes of integers from 0 to 9 for (i = 0; i < 10; i++) & printf("The cube of %d is %d\n", i, cube(i));
getch(); // Waiting for user's action return 0; }
// Function that prints "Hello World" on console void print_hello() { printf("Hello world!\n"); }
// Function that computes the cube of the integer long cube(const int pNumber) { return pNumber * pNumber * pNumber; }
// Function that defines is the integer positive // (uses the condition statement) int is_positive(int pNumber) { if (pNumber > 0) & return 1; else & return -1; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment