Google Translate

Progam pembagian dengan sisa

#include "stdio.h"
#include "conio.h"

void main () {
    int data1;
    int data2;

        printf ("masukan bilangan 1 : ");
        scanf ("%d",&data1);
        printf ("masukan bilangan 2 : ");
        scanf ("%d",&data2);

      if (data1 < data2){
      printf ("maaf bilangan yang anda masukan salah");
      }else{
      printf ("hasil = %d", data1 / data2 );
          if (data1 % data2 !=0 ){
         printf ("\nsisanya adalah : %d", data1 % data2);
       }
   }

  getch ();
}
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 comments

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© ILMU TEKNIK INFORMATIKA
Designed by BlogThietKe Cooperated with Duy Pham
Released under Creative Commons 3.0 CC BY-NC 3.0
Posts RSSComments RSS
Back to top