C program (NEW) that receives a 10 (or n) digit number and print it out in large size with custom symbol

This Post Is  A next Version Of Old post whom print number with fixed symbol but in this post we will give the custom input for print number with custom symbol.we are give integer number (ASCII value of symbols) as a input and print the number.

 like 3 for heart  , 35 for # , 64 for @ for more view table decimal value use as input click here

 

 c code :-

#include<stdio.h>
int z='+';
void num(int num,int x){//all numbers printed from zero to nine

 if(num==1){
    if(x==1)printf("%c%c%2c",z,z,32);
    if((x<6&&x>1)||x==0)printf(" %c%2c",z,32);
    if(x==6)printf("%c%c%c%1c",z,z,z,32);  }

 if(num==2){
    if(x==0||x==3||x==6)printf("%c%c%c%c%c%c%c%2c",z,z,z,z,z,z,z,32);
    if(x==1||x==2)printf("      %c%2c",z,32);
    if(x==5||x==4)printf("%c      %2c",z,32);  }

if(num==3) {

    if(x==0||x==3||x==6)printf("%c%c%c%c%c%c%c%2c",z,z,z,z,z,z,z,32);
    if(x==1||x==2||x==5||x==4)printf("      %c%2c",z,32);  }

if(num==4){
    if(x==0||x==1)printf("%c%5c",z,32);
    if(x==2)printf("%c %c%3c",z,z,32);
    if(x==3)printf("%c%c%c%c%2c",z,z,z,z,32);
    if((x>3)&&(x<7))printf("  %c%3c",z,32);}

if(num==5){
    if(x==0||x==3||x==6)printf("%c%c%c%c%c%c%2c",z,z,z,z,z,z,32);
    if(x==1||x==2)printf("%c%7c",z,32);
    if(x==4||x==5)printf("     %c%2c",z,32);  }

if(num==6){
    if(x==0||x==3||x==6)printf("%c%c%c%c%c%c%2c",z,z,z,z,z,z,32);
    if(x==1||x==2)printf("%c%7c",z,32);
    if(x==4||x==5)printf("%c    %c%2c",z,z,32);  }

if(num==7){
 if(x==0)printf("%c%c%c%c%c%c%c%2c",z,z,z,z,z,z,z,32);
 if(x==1)printf("%c     %c%2c",z,z,32);
 if(x==2)printf("      %c%2c",z,32);
 if(x==3)printf("     %c%3c",z,32);
  if(x==4)printf("    %c%4c",z,32);
 if(x==5)printf("    %c%4c",z,32);
  if(x==6)printf("    %c%4c",z,32);
}

if(num==8){
    if(x==0||x==3||x==6)printf(" %c%c%c%c %2c",z,z,z,z,32);
    if(x==1||x==2||x==4||x==5)printf("%c    %c%2c",z,z,32); }


if(num==9){
    if((x==0))printf(" %c %c %2c",z,z,32);
    if((x==1)||(x==2)||(x==5))printf("%c   %c%2c",z,z,32);
    if((x==3)||(x==6))printf("%c%c%c%c%c%2c",z,z,z,z,z,32);
    if(x==4)printf("    %c%2c",z,32);
         }
if(num==0){
    if(x==0||x==6)printf(" %c%c%c%c %2c",z,z,z,z,32);
    if((x>0)&&(x<6))printf("%c    %c%2c",z,z,32);
         }
}

void pnum(int t,int *p)//for printing number first print first line of all numbers and so on
{int c;
for(int x=0;x<8;x++){
                     printf("\n "),c=0;
                           while(c<t) num(p[c],x),c++;  }
}

int main()
{  int a[10]={0},t,x;

printf(" Enter special symbol: "),scanf("%d",&z);
printf(" Enter total Digit count (maximum 10 example: 225 = 3 digit) : ");
scanf("%d",&t);

if(t>10)printf(" Try with less number of digit..");
else printf(" Enter number value you want print : "), scanf(" %d",&x);

for(int i=t-1;i>=0;i--)a[i]=(x%10),x=x/10;//storing single number in single variable in array

pnum(t,a);//print numbers
}

//if you want to use fixed symbol Click Here

 //for suggestion or author issue comment below thanks for visiting here please share and subscribe 


0 Comments