Tugas Alpro PPT Minggu ke 2 Kasus 2.1
- Hitunglah jumlah dari 3 buah bilangan bulat!
- Analisis :
- Input : misalkan a,b,c semua integer
- Proses : jumlah = a+b+c
- output : tulis (jumlah)
Logikanya menggunakan raptor
Program C++
#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int a,b,c,jumlah;
cout<<"masukkan niali a = ";cin>>a;
cout<<"masukkan nilai b = ";cin>>b;
cout<<"masukkan nilai c = ";cin>>c;
jumlah=a+b+c;
cout<<"hasil penjumlahan 3 buah bilangan bulat adalah = "<<jumlah;
return 0;
}
ABOUT THE AUTHOR
A web designer from India. And then you write some more information about yourself like this to fill out the space that is left.


0 komentar:
Posting Komentar