Header Ads

banner image

Social

Program Penjumlahan

Penjumlahan

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

using namespace std;
int main()
{
char awal,ulang;
float nilai1,nilai2,hasil;
int menu;
cout<<"  Program by :     Serba C++"<<endl;
cout<<" ------------Menghitung penjumlahan bilangan------------"<<endl;

awal:

cout<<" Nilai  I   : "; cin>>nilai1;
cout<<" Nilai  II  : "; cin>>nilai2;

cout<<nilai1<< "+" <<nilai2<<endl;

hasil=(nilai1+nilai2);

cout<<"jumlah : "<<hasil<<endl;

  cout<<"Apakah ingin menghitung lagi? [Y/T] ?: ";cin>>ulang;
    if (ulang=='Y'||ulang=='y')
     goto awal;
    else
     getch();
     return 0;


}



Program Penjumlahan Program Penjumlahan Reviewed by ekawahyu on 03:43 Rating: 5

No comments:

Home Ads

Powered by Blogger.