1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
oksano4ka [1.4K]
3 years ago
10

.) Write a complete C program in one file which takes a double value from the user, cubes it, and prints the result. Your progra

m must use a function which takes a parameter for the value to be cubed and returns the result by value. The function may not print anything or read anything directly from the user (i.e. no cin/cout in the function). Hint: n cubed is defined as n*n*n. Upload as cubeValue.cpp.
Computers and Technology
1 answer:
Ket [755]3 years ago
8 0

Answer:

Explanation:

#include <iostream>

using namespace std;

double cube(double);

int main()

{

   double ci=0;

   cout << "Enter avalue :";

   cin >> ci;

   cout << "Cube of " << ci << "is =" << cube(ci) << endl;

   return 0;

}

double cube(double i)

{

   return(i*i*i);

}

You might be interested in
Hey plz help me with this<br>What is malware short for?​
soldier1979 [14.2K]

Answer:

Malware is the collective name for a number of malicious software variants, including viruses, ransomware and spyware. Shorthand for malicious software, malware typically consists of code developed by cyberattackers.

Explanation:

4 0
2 years ago
Explain the concepts o f polymorphism, Encapsulation, Inheritance in detail with suitable examples?
levacccp [35]

Answer:

Encapsulation:-It is the binding of the data and functions so that they works as one unit.

Inheritance:-When one class acquires the property of another class it is called inheritance.

Polymorphism :-It generally means more than one form

Explanation:

Encapsulation:- class is an example of encapsulation it can hold different data types and functions in a single container called class.

class Name{

public:

string first_name;

string last_name;

void Display()

{

cout<<first_name<<" "<<last_name<<endl;

}

};

Inheritance:-The property of a class acquiring the properties of another class is called inheritance.

Now we will inherit the above defined class.

class person: public Name

{

public:

char gender;

int age;

void Display()

{

cout<<first_name<<" "<<last_name<<gender<<age<<endl;

}

};

int main()

{

Name n;

person p;

n.Display();

p.Display();

}

Polymorphism- There are two types of polymorphism:-

1.Run time polymorphism=The values are decided at run time.

2.Compile time polymorphism=The values are decided at compile time.

Example:-In the above example we have function Display() in both the classes.This is an example of compile-time polymorphism. We are deciding at the time of compilation which display to use.

8 0
3 years ago
4) Short answer questions<br>c) What is Cyber Law?​
Kamila [148]

Answer:

Kindly check explanation

Explanation:

Laws refer to legal rules and regulatory framework which is used as a guiding principle to define the actions and behavior which may lead to incurring penalties if boundaries are trespassed.

The word 'Cyber' is popularly used to describe activities, actions and interactions involving the internet. With the burst and continous pace of digital transformation, the internet also called Cyberspace is in a world of its own. Hence, the creation of rules to govern internet interactions.

Cyber laws may thus be explained as codified laws which are designed and implemented to govern all forms of possible online interaction or transactions in other enhance cyber security to protect the interest of persons and data from various forms of internet threats. Cyber laws include ; Data protection laws, Computer crime laws, telecommunication laws and so on.

6 0
3 years ago
Your company has decided to hire a full-time video editor. You have been asked to find a system with the level of display qualit
mote1985 [20]

Answer:

"Resolution" and "Refresh rate" is the correct answer.

Explanation:

Resolution:

  • The resolution would be a step for describing the spatial brightness as well as cleanliness of something like a photograph but rather an image. It's always commonly being utilized for the performance evaluation of monitoring devices, digital photographs as well as numerous additional technology components.

Refresh rate:

  • A computer display as well as visualization technology feature that determines the equipment frequency as well as capacity for repainting or re-drawing that this whole presentation upon on-screen for every instant.
4 0
2 years ago
What are your thoughts about this re-designed Logo? Is it good? Or is poorly designed? Explain your answer below.
IgorLugansk [536]

Answer:

It is good but the back is not good enough.

6 0
3 years ago
Other questions:
  • Does anyone have any social media message me
    14·1 answer
  • Given the following adjacency matrix, what is the approximate rank vector after one iteration of the power iteration method (use
    10·1 answer
  • On a wireless router, what gives out IP addresses?<br> DHCP<br> DNS<br> WPA<br> WPS
    7·1 answer
  • What command launches the remote desktop client for windows?
    12·1 answer
  • How do i show all emails from same sender in outlook
    13·2 answers
  • In what order does the air flow in a canister vacuum cleaner pass through the following components?
    11·1 answer
  • Where are the worksheet tabs located
    7·1 answer
  • What is the first priority when building or using vex robots
    10·2 answers
  • Which layer in the Transmission Control Protocol/Internet Protocol (TCP/IP) model is responsible for delivering data between two
    12·1 answer
  • Javier downloads an illustration from an online Image library and modifies it for his purposes. The illustration he downloads is
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!