A spreadsheet function that indicates the average of a group of numbers in a range.
Answer:
public class Brainly
{
public static void main(String[] args)
{
BinaryConverter conv = new BinaryConverter();
String binStr = "01001101";
System.out.print(binStr + " in decimal is "+conv.BinToDec(binStr));
}
}
public class BinaryConverter
{
public int BinToDec(String binStr)
{
int d = 0;
while(binStr.length() > 0)
{
d = (d << 1) + ((binStr.charAt(0) == '1') ? 1: 0);
binStr = binStr.substring(1);
}
return d;
}
}
Explanation:
The program "eats" the string from left to right, and builds up the integer representation in variable "d" on the go. While there are digits left, it shifts the previous result to the left and sets the least signficant bit to 1 only if the corresponding string character is a 1.
verry true, unless ou dont need a loan, if you have cash then the answer is false
I believe the answer is false
#accepting input from user
n=int(input("Enter a number: "))
#entered number is stored in a temporary variable
temp=n
#initializng required variables
rev=0
dgt=0
#digits are reversed inside while loop
while(n>0):
dgt=n%10
rev=rev*10+dgt
n=n//10
#original number and its reverse are compared
if(temp==rev):
#if equal, it's a palindrome
print("It is a Palindrome")
else:
#if not equal, it's not a palindrome
print("It is not a Palindrome")
#◌⑅⃝●♡⋆♡Nåmřāthā♡⋆♡●⑅◌