This smells like homework, so I won't give you any actual code. Rather, I'll give you some pseudo-code for the function that returns the area:
calcarea (decimal width, decimal length)
return width * length
P.S., jeez, it's not that hard to do your homework, is it?
Chat with our AI personalities
#include<iostream>
using namespace std;
int main()
{
int side,area;
cout<<"Please,Enter the length of the square side : ";
cin>>side;
area=side*side;
cout<<"The square's area is = "<<area<<endl;
return 0;
}
By using that one thing.
There is no need to write a C program for circuit analysis; there are lots of packages out there that already do that (for example, Spice).
double square (double x) { return x*x; } double cube (double x) { return x*x*x; }
To write a C program to determine if something is odd or even you need to be a programmer. To write a program in C is complicate and only done by programmers.
c#