Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looping iseng dengan For While Syntax
#1
Death_16 
dri pada ane depes dan gak ngapa2in mending iseng2 ngoding c++ aja gan,,,,
Code:
//Author : RieqyNS13// //Program : coba sndiri // #include <iostream> #include <string> #include <iomanip> #include <windows.h> using namespace std; int main() { system("color 0A"); system("TITLE looping Mas bro"); unsigned long int loop, time, a=0, x; char set = ' '; cout<<"Input Looping = "; cin>>loop; cout<<"Input Interval = "; cin>>time; cout<<"Input Setfill Variabel = "; cin>>set; //Kalkulasi'_'// while(loop=loop-1) { int t=loop+1;; for(int a=1; a<=loop; a=a+1) { int c=a; c=c*2; t=t-1; cout<<setfill(' ')<<setw(t)<<" "<<setfill(set)<<setw(c)<<" "<<endl; Sleep(time); } x=loop; for(int b=1; b<=loop; b=b+1) { x=x-1; int z=b, v=x; v=v*2; z=z+1; cout<<setfill(' ')<<setw(z)<<" "<<setfill(set)<<setw(v)<<" "<<endl; Sleep(time); } } //////////////// system ("pause>nul"); return 0; }

setelah di compile (klo ane pke DevC++) hasilnya kaya gini gan,,
[Image: 2btfzo.png]
sorry klo cuma gitu doank
gue homo, thanks Santet
Reply


Messages In This Thread
Looping iseng dengan For While Syntax - by RieqyNS13 - 06-13-2012, 11:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Buat Ombak Segitiga dengan While dan For RieqyNS13 7 214 11-20-2013, 03:53 PM
Last Post: Bung Ali
  kalkulator sederhana dengan C++ Destr0yer 18 441 02-18-2013, 11:37 AM
Last Post: Destr0yer
  Perulangan Dengan While love_him 6 127 05-26-2012, 01:11 AM
Last Post: love_him
Petunia_16 Pemrograman Bahasa C dengan Turbo C Destr0yer 2 91 05-14-2012, 07:34 AM
Last Post: Destr0yer

Forum Jump:


Users browsing this thread: 1 Guest(s)