RieqyNS13 icon

Triangle-Loop-Generator

RieqyNS13 | PRO | 07/02/12 01:08:32 PM UTC | 0 ⭐ | 438 👁️ | Never ⏰ | []
C++ |

1.61 KB

|

None

|

0 👍

/

0 👎

//----------------------------------------//
//Coded by:RieqyNS13                  //
//Name:Triangle-Loop-Generator //
//Compiler:DevC++(General)     //
//Level=Beginners ^_^             //
//Note:This script is Not Hack,_//
//_but just a logical statement//
//---------------------------------//
#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); 
                    }   
}   
////maho//////   
system ("pause>nul");   
return 0;
}

Comments