Monday, 6 August 2018

Beautiful Addition

===========================================================================
                                CODING



#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
#include<stdlib.h>
#include<math.h>

void main()
{
    clrscr();
    int a,b,c;
    gotoxy(10,5);
    printf("Enter 1st number: ");  cin>>a;
    gotoxy(10,5);
    printf("Enter 2nd number: ");  cin>>b;
    c=a+b;
    clrscr();
    gotoxy(31,3);
    cprintf("█████");
    gotoxy(31,4);
    printf("██%d██",a);
    gotoxy(31,5);
    cprintf("█████");
    gotoxy(37,4);
    cprintf("+");
    gotoxy(39,3);
    cprintf("█████");
    gotoxy(39,4);
    printf("██%d██",b);
    gotoxy(39,5);
    cprintf("█████");
    gotoxy(45,4);
    cprintf("=");
    gotoxy(47,3);
    cprintf("█████");
    gotoxy(47,4);
    printf("██%d██",c);
    gotoxy(47,5);
    cprintf("█████");
    getch();
}




===========================================================================


                                OUTPUT


No comments:

Post a Comment