- #1
ming2194
- 32
- 0
(*sovled) basic C program problem
attrached.
and one more thing is:
if the angle is 90, a statement "This is a right angle." should be appeared in the last rows,
else, "This is not a right angle" instead.
also, the degee is 90 (interger) but not 90.0
attrached
#include<stdio.h>
int main ()
{ int degree;
float radian;
printf("Enter the angle in Degree:\n");
scanf( "%d", °ree );
printf("\nDegree is %d",°ree);
radian= degree/57.295779
printf("\nRadian is %3d",&radian);
if (degree!=90)
printf("\nThis is not a right angle");
else
printf("\nThis is a right angle");
return 0;
}
im just a beginner of writing c programe.
so maybe there many mistakes in my work.
plx forgiving that.
Homework Statement
attrached.
and one more thing is:
if the angle is 90, a statement "This is a right angle." should be appeared in the last rows,
else, "This is not a right angle" instead.
also, the degee is 90 (interger) but not 90.0
Homework Equations
attrached
The Attempt at a Solution
#include<stdio.h>
int main ()
{ int degree;
float radian;
printf("Enter the angle in Degree:\n");
scanf( "%d", °ree );
printf("\nDegree is %d",°ree);
radian= degree/57.295779
printf("\nRadian is %3d",&radian);
if (degree!=90)
printf("\nThis is not a right angle");
else
printf("\nThis is a right angle");
return 0;
}
im just a beginner of writing c programe.
so maybe there many mistakes in my work.
plx forgiving that.
Attachments
Last edited: