write a program in Q Basic format to accept the length of a rod in millimetres and Express the same in centimetre and metre
Answers
Answered by
0
Answer:answar is given under
Explanation:#include<stdio.h>
void main()
{
float number1,number2,number3;
printf("Entet the number in milimeter ");
if(scanf("%f",&number1)==1)
{
number2=number1/10;
number3=number1/1000;
printf(" \nYour answer in centimeter =%0.2f",number2);
printf("\nYour answer in meter =%0.2f",number3);
}
else
{
printf("error,enter correct value");
}
}
===================================OUTPUT================================
Entet the number in milimeter =>10021
Your answer in centimeter =1002.10
Your answer in meter =10.02
Similar questions