There isn't enough info for me to answer this with complete confidence XD.
Explanation:
#include<iostream>
#include<string.h>
using namespace std;
char *removestring(char str[80])
{
int i,j,len;
len = strlen(str);
for( i = 0; i < len; i++)
{
if (str[i] == ' ')
{
for (j = i; j < len; j++)
str[j] = str[j+1];
len--;
}
}
return str;
}
int main ()
{
char str[80];
cout << "Enter a string : ";
cin.getline(str, 80);
strcpy(removestring(str), str);
cout << "Resultant string : " << str;
return 0;
}
In this program the input is obtained as an character array using getline(). Then it is passed to the user-defined function, then each character is analyzed and if space is found, then it is not copied.
C++ does not allow to return character array. So Character pointer is returned and the content is copied to the character array using "strcpy()". This is a built in function to copy pointer to array.
Answer:
value=int(input("Enter the number up-to the user wants the Fibonacci series: "))
a=0
b=1
c=1
for x in range(value):
print(c,end=" ")
c=a+b
a=b
b=c
Output :
- If the user input 5, then the output is "1 1 2 3 5".
- If the user input 10, then the output is "1 1 2 3 5 8 13 21 34 55".
Explanation:
- The above defined a python program which is used for the Fibonacci series.
- The first line of the program is used to instruct the user and take the input from the user.
- Then the for loop executes up-to that range value.
- Then in the for-loop, the two variable needs to store the current value and previous value which is used to give the series after addition.
Answer:
Decorative font, because having a fancy font on a resume is not going to be looked at