Answer:
#include<stdio.h>
void ConvertFahrenheit(float);
void main()
{
float fahrenheit_temp;
printf("Input the temperature in Fahrenheit: ");
scanf("%f", &fahrenheit_temp);
ConvertFahrenheit(fahrenheit_temp);
}
void ConvertFahrenheit(float fahren) {
float c, k;
c = (fahren - 32)/1.8;
k = (fahren + 459.67)/1.8;
printf("Celsius = %f\n", c);
printf("Kelvin = %f", k);
}
Explanation:
- Inside the main function, take the temperature in Fahrenheit as an input from user and call the ConvertFahrenheit function by passing it the fahrenheit_temp variable as an argument.
- Create the ConvertFahrenheit function for the conversion and convert the fahrenheit value to the Celsius and Kelvin by using their conversion formulas respectively.
- Lastly, display the result in Celsius and Kelvin.
Democracy is the best form of government simply because no other form of government is known to work well. Democracy may have its flaws but all in all it .
Answer:
b=0
c=0
lol=list()
while True:
salary=input("Enter your salary: ")
if salary=="e" or salary=="E":
print("Thankyou!!")
break
else:
a=int(salary)
if a>=300000 and a<=400000:
c=c+1
if a<0 or a>400000:
print("Your salary is either too small or too big ")
if a>0 and a<=400000:
a=a-(25/100*a)-(5/100*a)-(2/100*a)
lol.append(a)
b=b+1
if a>=300000:
c=c+1
print(lol)
print("The number of salaries entered is: "+ str(b))
print("The number of salaries that exceeded 300000 is: "+str(c))