Pages

Monday, November 3, 2014

Menghitung Luas & Kel Persegi Panjang dengan C





Unknown | 9:30 AM | 0 Comments



#include <stdlib.h>
#include <iostream>
#include <stdio.h>

using namespace std;

int main()
{
    float p,l,lu,kel;
    printf("--------------------------------------------------\n");
printf ("\t Menghitung Luas dan Keliling \n");
    printf ("\t \t Persegi Panjang \n");
    printf("--------------------------------------------------\n");
    //input
    printf("Masukan Panjang \t : ");scanf("%f",&p);
    printf("Masukan Lebar \t \t : ");scanf("%f,",&l);
    printf("--------------------------------------------------\n");

    //proses
    lu = p*l;
    kel = 2*(p+l);

    //output
    printf("Jadi \t \t \n");
    printf("Luasnya adalah \t \t : %10.2f \n",lu);
    printf("Kelilingnya adalah \t : %10.2f \n",kel);
    printf("--------------------------------------------------\n");

    system ("PAUSE");
    return 0;

}



By Unknown
A Short Description about youself







Stay Connected With Us
Feed Icon Twitter Icon Facebook Icon Google+ Icon Youtube Icon


Share and Spread Share On Facebook +1 This Post Digg This Post Stumble This Post Tweet This Post Tweet This Post Tweet This Post Save Tis Post To Delicious Share On Reddit Bookmark On Technorati


Related Articles

JOIN THE DISCUSSION

Any feedback, questions or ideas are always welcome. In case you are posting Code ,then first escape it using Postify and then paste it in the comments

0 comments: