The code below is written in javascript which gives us the integer,
<h3>The function code is</h3>
function solution (num){
//Javascript function
var x=0,sum=0,a,b;
var d=""; //variable declaration
var digits = num.toString().split('');
var Individual = digits.map(Number);
//console.log(Individual);
for (var i=0;i<Individual.length;i++)
{//For loop
x=x+Individual[i];
}
var y=x*2;
for(var i=0;i<Individual.length;i++)
{
sum=sum+Individual[i];
d=""+d+Individual[i];
if(sum==y)
break;
if(i==Individual.length-1)
{
i=-1;
continue;
}
}
console.log("the value is "+d);
}
var number = prompt("enter the number");
//Asking user for value...
console.log("the number is");
console.log(number);
solution(num
For more information on javascript, visit
brainly.com/question/16698901?referrer=searchResults
Answer:
C++ code explained below
Explanation:
#include<bits/stdc++.h>
#include <iostream>
using namespace std;
int FiboNR(int n)
{
int max=n+1;
int F[max];
F[0]=0;F[1]=1;
for(int i=2;i<=n;i++)
{
F[i]=F[i-1]+F[i-2];
}
return (F[n]);
}
int FiboR(int n)
{
if(n==0||n==1)
return n;
else
return (FiboR(n-1)+FiboR(n-2));
}
int main()
{
long long int i,f;
double t1,t2;
int n[]={1,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75};
cout<<"Fibonacci time analysis ( recursive vs. non-recursive "<<endl;
cout<<"Integer FiboR(seconds) FiboNR(seconds) Fibo-value"<<endl;
for(i=0;i<16;i++)
{
clock_t begin = clock();
f=FiboR(n[i]);
clock_t end = clock();
t1=double(end-begin); // elapsed time in milli secons
begin = clock();
f=FiboNR(n[i]);
end = clock();
t2=double(end-begin);
cout<<n[i]<<" "<<t1*1.0/CLOCKS_PER_SEC <<" "<<t2*1.0/CLOCKS_PER_SEC <<" "<<f<<endl; //elapsed time in seconds
}
return 0;
}
Answer:
https://www.w3resource.com/python-exercises/python-conditional-exercise-2.php
Answer:
When working with a file, <u>stabilize</u> the blade in a vis or against a solid surface such as a work bench to avoid injury and to ensure an even stroke
Explanation:
The file can be used to sharpen a blade to increase the effectiveness of the blade. In order to properly sharpen a file in a safe manner, the blades to be sharpen, which ae usually relatively flexible as compared to the file, should be made stable during the repetitive forward and backward notion of the file, for safety, to avoid being injured by the recoil of the blade, and also to ensure that the stroke is evenly applied to the blade.