Answer:
//Program was implemented using C++ Programming Language
// Comments are used for explanatory purpose
#include<iostream>
using namespace std;
unsigned int second_a(unsigned int n)
{
int r,sum=0,temp;
int first;
for(int i= 1; I<=n; i++)
{
first = n;
//Check if first digit is 3
// Remove last digit from number till only one digit is left
while(first >= 10)
{
first = first / 10;
}
if(first == 3) // if first digit is 3
{
//Check if n is palindrome
temp=n; // save the value of n in a temporary Variable
while(n>0)
{
r=n%10; //getting remainder
sum=(sum*10)+r;
n=n/10;
}
if(temp==sum)
cout<<n<<" is a palindrome";
else
cout<<n<<" is not a palindrome";
}
}
}
Explanation:
The above code segments is a functional program that checks if a number that starts with digit 3 is Palindromic or not.
The program was coded using C++ programming language.
The main method of the program is omitted.
Comments were used for explanatory purpose.
Answer:
Following the ways of dealing with incomplete questions, i was able to get the complete question, please look at the attachment for ans.
Answer:
The specific weight of unknown liquid is found to be 15 KN/m³
Explanation:
The total pressure in tank is measured to be 65 KPa in the tank. But, the total pressure will be equal to the sum of pressures due to both oil and unknown liquid.
Total Pressure = Pressure of oil + Pressure of unknown liquid
65 KPa = (Specific Weight of oil)(depth of oil) + (Specific Weight of unknown liquid)(depth of unknown liquid)
65 KN/m² = (8.5 KN/m³)(5 m) + (Specific Weight of Unknown Liquid)(1.5 m)
(Specific Weight of Unknown Liquid)(1.5 m) = 65 KN/m² - 42.5 KN/m²
(Specific Weight of Unknown Liquid) = (22.5 KN/m²)/1.5 m
<u>Specific Weight of Unknown Liquid = 15 KN/m³</u>