#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
Find the angle nearest to the whole number between the surfaces x2+y2+z2=9 and z=x2+y2-3 at the point (2, -1, 2).
Select one:
A 560
B 550
C 54o
D 53o
Based on geology water quality nexus ,discuss the likehood or otherwise for ground water use. Use a Ghanaian coastal area as case study
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
Contest Teamld: AME1481
oblem Statement
lex likes to play with numbers. She gave you an integer N
Your task is to find the number of positive integers less than or equ al to N that have an odd number of digits
For example 143 contains 3 digits it satisfies the condition, whereas 32 has 2 digits does satisfy the condition.
Input Format
The first line contains a single integer N.
1≤N≤100000
22
mat