Answer:
See explaination
Explanation:
#include <iostream>
#include<string.h>
using namespace std;
bool isPalindrome(string str, int lower, int upper){
if(str.length() == 0 || lower>=upper){
return true;
}
else{
if(str.at(lower) == str.at(upper)){
return isPalindrome(str,lower+1,upper-1);
}
else{
return false;
}
}
}
int main(){
string input;
cout<<"Enter string: ";
cin>>input;
if(isPalindrome(input,0,input.length()-1)){
cout<<input<<" is a palindrome"<<endl;
}
else{
cout<<input<<" is NOT a palindrome"<<endl;
}
return 0;
}
Answer:
// Program is written in C++
// Comments are used to explain some lines
// Only the required function is written. The main method is excluded.
#include<bits/stdc++.h>
#include<iostream>
using namespace std;
int divSum(int num)
{
// The next line declares the final result of summation of divisors. The variable declared is also
//initialised to 0
int result = 0;
// find all numbers which divide 'num'
for (int i=2; i<=(num/2); i++)
{
// if 'i' is divisor of 'num'
if (num%i==0)
{
if (i==(num/i))
result += i; //add divisor to result
else
result += (i + num/i); //add divisor to result
}
}
cout<<result+1;
}
Answer:
endurance length is 236.64 MPa
Explanation:
data given:
d = 37.5 mm
Sut = 760MPa
endurance limit is
Se = 0.5 Sut
= 0.5*760 = 380 MPa
surface factor is
Ka = a*Sut^b
where
Sut is ultimate strength
for AISI 1040 STEEL
a = 4.51, b = -0.265
Ka = 4.51*380^{-0.265}
Ka = 0.93
size factor is given as
Kb =1.29 d^{-0.17}
Kb = 0.669
Se = Sut *Ka*Kb
= 380*0.669*0.93
Se = 236.64 MPa
therefore endurance length is 236.64 MPa
Most Motor Vehicle catches in Florida in 2016 occurred on Motorcycles. Another option could be roads.