Tuesday, July 12, 2011

C Programming - Program Mencari Regangan Jembatan

#include <stdio.h>

int main()
{
    float L,l,d;
    printf ("Mencari regangan jembatan. \n");

    printf("Input panjang rentangan: ");
    scanf("%f", &l);
    printf("Input lengkungan : ");
    scanf("%f", &d);

    L=(float)l+(float)(8.0*(d*d))/(float)3.0*l;

    printf("Panjang kabel=%.3f\n", L);
    return 0 ;
}

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...