Thursday, March 10, 2011

0

C Program Language (Converting Degree to Radian)

  • Thursday, March 10, 2011
  • RJ
  • Share
  • These post will be handling on how to convert degree to radian including minutes. Here's the output.

    Check out the codes and learn something.


    #include<stdio.h>
    #include<conio.h>
    #include<stdlib.h>
    #include<math.h>
    
    int main()
    {
    float a, b, c, d;
    char s; 
    
    printf("Enter Degrees: ");
    scanf("%f", &a);
    printf("Enter Minutes: ");
    scanf("%f", &b);
    
    c=((b/60)+a)*(3.1416/180);
    
    printf("\nThe radians is %.0f", c);
    
    printf("\n\nPress y to continue and x to exit: ");
    scanf("%s", &s);
    if(s=='y') {
    system("cls");
    return main();
    getch();
    }
    if(s=='x')
    {
    return 0;
    }}
    

    0 Responses to “C Program Language (Converting Degree to Radian)”

    Post a Comment

    Subscribe