#include <iostream>
#include <cstring>
using namespace std;
#define STR_MAX_SIZE 100
void preserveString(char*, int);
int main(void) {
char str[STR_MAX_SIZE];
cout << "Enter string: ";
fgets(str, STR_MAX_SIZE, stdin);
preserveString(str, strlen(str));
return 0;
}
void preserveString(char *str, int size) {
if(size > 0) {
for(int i = 0; i < size - 1; i++) {
cout << str[i];
}
cout << endl;
// TODO: Add the recursive case of the function here
}
}
please help me to add the recursive function thankyou
a block of 18kg is pushed along a horizontal frictionless surface by a horizontal force of 80N. the block start from rest. compute the kinetic energy after 6 seconds
In a large region, there are 450 farmers. 250 pounds of farm beetroot, 110 pounds of farm yams, 75 pounds of farm radish, 45 pounds of farm beetroot and radish, 40 pounds of farm yams and radish, and 30 pounds of farm beetroot and yams Let B, Y, and R represent the farms that grow beets, yams, and radish, respectively.
Determine the number of farmers that farm beetroot, yams, and radish.
if A=2i+j+k, B=i-2j+2k and C=3i-4j+2k , find the projection A+C in the direction of B.
Create a class heater that contains a single integer field temperature. Define a constructor that takes no parameter. The temperature field should be set to the value 15 in the constructor. Define the mutates warmer and cooler, whose effect is to increase or decrease the value of the temperature by 5.
characters.asm: Construct an assembly language program that will accept any character then tells whether the entered character is an alphabet, a number, or a special symbol.
Month.asm: Construct an assembly language program that accepts month in number form then displays it in worded form. (Use A for 10, B for 11, and C for 12)
Example:
- Enter Month in number form: 6
Number 6 month form is June
Objective:
Write a program that asks the user for the name of a file. The program should display
the last 10 lines of the file on the screen (the “tail” of the file). If the file has fewer than
10 lines, the entire file should be displayed, with a message indicating the entire file
has been displayed.
NOTE:
Using an editor, you should create a simple text file that can be used to test this
program.
2.83 g of a sample of haematite iron ore [iron (III) oxide, Fe2O3] were dissolved in concentrated hydrochloric acid and the solution diluted to 250 cm3. 25.0 cm3 of this solution was reduced with tin(II) chloride (which is oxidised to Sn4+ in the process) to form a solution of iron(II) ions. This solution of iron(II) ions required 26.4 cm3 of a 0.0200 mol/dm3 potassium dichromate(VI) solution for complete oxidation back to iron(III) ions.
(a) given the half–cell reactions
(i) Sn4+(aq) + 2e– ==> Sn2+(aq)
and (ii) Cr2O72–(aq) + 14H+(aq) + 6e– ==> 2Cr3+(aq) + 7H2O(l)
deduce the fully balanced redox equations for the reactions
(i) the reduction of iron(III) ions by tin(II) ions
(ii) the oxidation of iron(II) ions by the dichromate(VI) ion
(b) Calculate the percentage of iron(III) oxide in the ore.
Round the answer to this question to the nearest rand. David borrowed R911012,00
R911012,00 to refurbish his holiday home. The loan requires monthly repayments over 12 years. When he borrowed the money, the interest rate was 12,4% per annum, compounded monthly, but five years later the bank increased the annual interest rate to 13,9%, in line with market rates. After five years the present value of the loan is R682081,77
R682081,77. With the new interest rate, his monthly payments will increase by