Senin, 20 Mei 2013

Modul 4.4

Modul 4.4

http://www.youtube.com/watch?v=V_T9tLxybT0

Listing Program

// Modul 4.4.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <stdlib.h>
using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
    int X ;
    cout << "Masukan nilai X = ";
    cin >> X;
    cout <<"\n";

    X = (X < 0) ? -X : X;
    cout << "|X| = "<< X;
    cout << "\n\n";

    system ("pause");; // pause
    return 0;
}

 

Tidak ada komentar:

Posting Komentar