From bb54a35426057ea25850a0f52a781d39a41fc8fc Mon Sep 17 00:00:00 2001 From: Aswin C P Date: Sat, 17 Oct 2020 12:30:47 +0530 Subject: [PATCH] Created PrintUsingStar.cpp --- PrintUsingStarHorizontally.cpp | 112 +++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 PrintUsingStarHorizontally.cpp diff --git a/PrintUsingStarHorizontally.cpp b/PrintUsingStarHorizontally.cpp new file mode 100644 index 0000000..b88cf18 --- /dev/null +++ b/PrintUsingStarHorizontally.cpp @@ -0,0 +1,112 @@ +#include +using namespace std; +int i,j,n; + int c=0; +int digit[10000]; + extractdigit(int n) +{ + int save=n; + + while(save!=0)//to determine how many digit does the input have + { + save=save/10; + c++; + } + + + i=c-1; + while(n!=0) + { + + digit[i]=n%10; + n=n/10; + i--; + } + +} +int main() +{ + int i,j,n; + char repeat; + +string ar[9]={"*** "," * ","*****"," *","* "," ** "," * * "," * ","* *"}; +int zero[5]={2,8,8,8,2}; +int one[5]={0,1,1,1,2}; +int two[5]={2,3,2,4,2}; +int three[5]={2,3,2,3,2}; +int four[5]={7,5,6,2,7}; +int five[5]={2,4,2,3,2}; +int six[5]={2,4,2,8,2}; +int seven[5]={2,3,3,3,3}; +int eight[5]={2,8,2,8,2}; +int nine[5]={2,8,2,3,3}; +while(repeat!='n'||repeat!='N') +{//coded by "ASWIN CP". + +cout<<"ENTER ANY NUMBER"; +cin>>n; +extractdigit(n); + +for(i=0;i<5;i++) +{ + for(j=0;j>repeat; + +} +return 0;//Aswin Cp +}