Answer:
public static int average(int j, int k) {
return (int)(( (long)(i) + (long)(j) ) /2 );
}
Explanation:
The above code returns the average of two integer variables
Line 1 of the code declares a method along with 2 variables
Method declared: average of integer data type
Variables: j and k of type integer, respectively
Line 2 calculates the average of the two variables and returns the value of the average.
The first of two integers to average is j
The second of two integers to average is k
The last parameter ensures average using (j+k)/2
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;
}
It is important because now a days we all need help from engineers
Answer:
all exhaust gases from all gasoline engines
Explanation:
if u look at the back of ur car when its on u can feel the heat from the exhaust and whT ur feeling is the heat coming from the carbon monoxide gases
Answer:
V(rms) = 98.99 mV ≅ 100 mV
Explanation:
Outputs = -14 to +14
Gain = =100
We know that Gain = Output/Input
so, to find out the input voltage:
Input = Output/Gain
= ±14/-100
Input = 0.14 V
This is the peak input voltage (Vpk) of the sine wave and the question is asking us to find the rms value.
To calculate the rms value:
V(rms) = V(pk)/√2
= 0.14/√2
= 0.09899
= 98.99 mV
V(rms) ≅ 100 mV