Answer:
#include <iostream>
using namespace std;
int main(){
float cookies=0;
float sugar=1.5;
float butter=1;
float flour=2.75;
cout<<"how many cookies do you want: "<<endl;
cin>>cookies;
float num = cookies/48;
cout<<num<<endl;
cout<< "to make " << cookies<<"cookies you need: "<<endl;
cout<<"sugar cups: "<<num*sugar<<endl;
cout<<"butter cups: "<<num*butter<<endl;
cout<<"flour cups: "<<num*flour<<endl;
return 0;
}
Answer:
Answered below
Explanation:
Recursion refers to the process of a function calling itself within its own definition. It calls itself repeatedly until a base condition is met and the loop breaks.
The advantages of recursion over loops include;
A) Recursion reduces time complexity.
B) Recursion is better at tree traversal and graphs.
C) Recursion reduces the time needed to write and debug code and also adds clarity to code.
Disadvantages of recursion include;
A) Recursion uses more memory because each function call remains in stack until the base case is met.
B) Recursion can be slow.
C) Recursion
Answer:
The output of the given code as follows:
<u>Output:
</u>
1122
Explanation:
In the given java code the two for loop is defined, which can be described as follows:
- In the first loop, a"loop" variable is used, which starts from 1 and ends when the value of loop is less than 3, inside the loop a print function is used, that print value 1.
- In the next step, another for loop is declared, inside the loop a variable "loop2" variable is used, that's working is the same as the above loop, but in this loop, it will print a value, that is 2.
upfront price, but dependent on how long you use it you will save money, also the power it provides per square inch is low but that will be solved with time.
The Linux commands to be used in moving files include the following:
- mv/home/placy/confid_wh/home/bcassini
- mv/home/placy/projplan_wh/home/bcassini
<h3>What is a
Linux command?</h3>
A Linux command can be defined as a software program (utility) that is designed and developed to run on the command line, so as to enable an end user perform both basic and advanced tasks by entering a line of text.
In this scenario, the Linux commands to be used in performing various tasks include the following:
- Switch user (su), and then enter the password (1worm4b8).
- Move (mv)/home/placy/confid_wh/home/bcassini
- Move (mv)/home/placy/projplan_wh/home/bcassini
- Use ls-l/home/bcassini to verify the new location files.
<u>Note:</u> You've to log in as the root user (placy) before you can move his files.
Read more on Linux commands here: brainly.com/question/25480553
#SPJ1