Showing posts with label Algoritma Pemrograman I. Show all posts
Showing posts with label Algoritma Pemrograman I. Show all posts

Sunday, April 28, 2013

[Listing Latihan] Nested If Else










Contoh listing :


#include <stdio.h>
#include <conio.h>
#include <iostream.h>
main()
{
char jenis, ukuran;
int harga;
clrscr();
atas:
cout<<"Jenis Pakaian : ";cin>>jenis;
cout<<"Ukuran        : ";cin>>ukuran;
if (jenis=='K'||jenis=='k')
{              if (ukuran=='S'||ukuran=='s')
                                harga = 25000;
                else if (ukuran=='M'||ukuran=='m')
                harga = 35000;
   else
                harga = 45000;

[Listing Latihan] IF STRCMP












listing program :

#include<stdio.h>
#include<conio.h>
#include<iostream.h>
main()
{
int harga, jb;
char uk, *tp;
float Total;
puts("Pizza Hot 'Teh Lada'");
puts("==================================");
cout<<endl<<endl;