C Programing Mini Project V 1

  • Uploaded by: hafiz Al-Hadid
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View C Programing Mini Project V 1 as PDF for free.

More details

  • Words: 1,523
  • Pages: 8
#include <windows.h> #include <stdio.h> int square(int mami); function prototype 1 */ int factorial(int day1, int month1, function prototype 2 */ int dog(int x, int y); function prototype 3 */

/* int day2, int month2);

/* /*

int main() { int a, b, c, d, e, f, g, h, i, j, k, l, x, z; int year, month,month1,month2; int A, B, C, F, G,log; int day, day1, day2, *FO; char string[] = "LOADING"; /* array */ char string2[] = "--ANIS--IQBAL--EPOL--RIZMAN--HAFIZ...."; HANDLE hStdout; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hStdout, FOREGROUND_RED|FOREGROUND_GREEN| FOREGROUND_INTENSITY); /* red + blue color */ for ( x = 1; x <= 74; x++ ){ if (x<3){printf(" ");} else{printf("%c",4);_sleep(10);}}printf("\n"); for ( x = 1; x <= 74; x++ ){ if (x<3){printf(" ");} else {printf("%c",1);_sleep(5);}} do{

printf( "\n\nEnter date today:\t[e.g: 29 3 2009]\tPRESS ENTER\n\n"); date today: */ scanf( "%d%d%d", &d, &e, &f );

/* Enter

} while((d>=32)||(e>=13));

do{ HANDLE hStdout; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hStdout, FOREGROUND_GREEN|FOREGROUND_INTENSITY); green color */

/*

for (a=11;a<=76;a++){ printf("%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c\n",a,a,a,a,a,a,a,a,

a,a,a,a,a,a,a,a,a,a);_sleep(10);} for (a=11;a<=14;a++){ for (log=0;log<=38;log++){ printf("%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c%4c\n", string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log], string2[log]);_sleep(10);}} } while(d==0); f1: do{ HANDLE hStdout; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hStdout, FOREGROUND_GREEN|FOREGROUND_RED| FOREGROUND_INTENSITY); /* green + red color */

printf("\n\n\n\n\n\n\n"); for ( x = 1; x <= 74; x++ ){ if (x<3){printf(" ");} else{printf("%c",1);_sleep(10);}} printf("\n %c * * *** **** *** **** * * *** **** %c\n",1,1);_sleep(100); printf(" %c * * * * * * * * * * * * * * * %c\n",1,1);_sleep(100); printf(" %c * * * * * * * * * * * * * * * %c\n",1,1);_sleep(100); printf(" %c ***** * * **** * * *** *** * * **** %c\n",1,1);_sleep(100); printf(" %c * * * * * * * * * * * * * * %c\n",1,1);_sleep(100); printf(" %c * * * * * * * * * * * * * * %c\n",1,1);_sleep(100); printf(" %c * * *** * * *** **** * * *** * %c\n",1,1);_sleep(100); for ( x = 1; x <= 74; x++ ){ if (x<3){printf(" ");} else {printf("%c",1);_sleep(5);}} } while(d==0); do{ HANDLE hStdout; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hStdout, FOREGROUND_RED|FOREGROUND_BLUE| FOREGROUND_INTENSITY); /* red + blue color */ printf( "\n\n\n\n\n\n\nEnter your birthday date:\t[e.g: 29 3 2009 ]\tPRESS

ENTER\n\n"); /* Enter birthday date: */ scanf( "%d%d%d", &a, &b, &c ); } while((a>=32)||(b>=13)); day1=d; day2=a; month1=e; month2=b; printf( printf( printf( printf(

"\ncalculating");_sleep(100); ".");_sleep(100); ".");_sleep(100); ".\n");_sleep(100);

for (log=0;log<=6;log++) printf("%c\a", string[log]); _sleep(1000);

/* array LOADING */

/* 1000 = 1 second */

printf( ".\a");_sleep(1000);printf( ".\a");_sleep(1000);printf( ".\a"); _sleep(1000);printf( ".\a");_sleep(1000);printf( ".\a"); _sleep(1000);printf( ".\a");_sleep(900);printf( ".\n\n"); printf( "5\a\n");_sleep(800);printf( "4\a\n");_sleep(600); printf( "3\a\n");_sleep(400);printf( "2\a\n");_sleep(200);printf( "1\n\a");_sleep(100);printf( "0\a\n\n"); do{ HANDLE hStdout; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hStdout, FOREGROUND_GREEN|FOREGROUND_INTENSITY); /* green color */ for ( x = 1; x <= 19000; x++ ) /* function prototype 1 */ printf("%d%d%d%d%d%d%d\n ",789*square( x ),691*square( x ),78*square( x ), 99*square( x ),65*square( x ),44*square( x ),95*square( x ) ); } while(d==0); do{ HANDLE hStdout; hStdout = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hStdout, FOREGROUND_RED|FOREGROUND_BLUE| FOREGROUND_INTENSITY); /* red + blue color */ printf( "error..!!\n\n\n"); year=f-c; printf( "\nyour time in life: %dyear ",year); month=dog(month1,month2);

/* function

prototype 3 */ printf(" %dmonth ",month); day=factorial(day1,month1,day2,month2); prototype 2 */ printf("%dday ",day); z=86400; second */ FO=&z;

/*24*60*60*/

/* function

/* pointer ; hour * munute *

C=year*(12*(4*(7**FO))); years*months*weeks*days*hours*minutes*seconds */ //printf( "C:%d\n",C); seconds */

/* /* year in

B=month*(4*(7**FO)); months*weeks*days*hours*minutes*seconds */ //printf( "B:%d\n",B); seconds */ A=*FO*factorial(day1,month1,day2,month2); // printf( "A:%d\n",A); } while(d==0);

G=C+(B+A);

/* /* months in /* days in seconds */

/* years + months + days in seconds */

//printf( "G:%d\n",G); _sleep(3000); F=G/12/4/7/24/60/60; /* total seconds /months / weeks / days / hour / minute / second*/ printf( "\n\n\nAge in years:%d\n",F); _sleep(1000); g=G/4/7/24/60/60; printf( "\nAge in months:%d\n",g); h=G/7/24/60/60; printf( "\nAge in weeks:%d\n",h); i=G/24/60/60; printf( "\nAge in days:%d\n",i); j=G/60/60; printf( "\nAge in hours:%d\n",j);

_sleep(1000); _sleep(1000); _sleep(1000); _sleep(1000);

k=G/60; printf( "\nAge in minutes:%d\n",k); _sleep(1000); l=G; printf( "\nAge in seconds:%d\n\n\n\n\n\n",l); _sleep(10000); switch(b) {

case 1:_sleep(2000);printf("JANUARY\n* Ambitious and serious\n* Loves to teach and be taught\n"); printf("* Always looking at people's flaws and weaknesses\n* Likes to criticize\n"); printf("* Hardworking and productive\n* Smart, neat and organized\n* Sensitive and has deep thoughts\n"); printf("* Knows how to make others happy\n* Quiet unless excited or tensed\n* Rather reserved\n"); printf("* Highly attentive\n* Resistant to illnesses but prone to colds\n"); printf("* Romantic but has difficulties expressing love\n* Loves children\n* Easily jealous"); break; case 2:printf("FEBRUARY\n* Abstract thoughts\n* Loves reality and abstract\n* Intelligent and clever\n"); printf("* Changing personality\n* Temperamental\n* Quiet, shy and humble\n* Low self esteem\n"); printf("* Honest and loyal\n* Determined to reach goals\n* Loves freedom\n* Rebellious when restricted\n"); printf("* Loves aggressiveness\n* Too sensitive and easily hurt\n* Showing anger easily\n* Ambitious\n"); printf("* Realizing dreams and hopes\n* Sharp\n* Loves entertainment and leisure\n"); printf("* Romantic on the inside not outside"); break; case 3:printf("MARCH\n* Attractive personality\n* Affectionate\n* Shy and reserved\n* Secretive\n"); printf("* Naturally honest, generous and sympathetic\n* Loves peace and serenity\n* Sensitive to others\n"); printf("* Loves to serve others\n* Not easily angered\n* Trustworthy\n* Appreciative and returns kindness\n"); printf("* Observant and assess others\n* Revengeful\n* Loves to dream and fantasize\n* Musically talented\n"); printf("* Loves special things\n* Moody"); break; case 4:printf("APRIL\n* Active and dynamic\n* Decisive and hateful but tends to regret\n"); printf("* Attractive and affectionate to oneself\n* Strong mentality\n* Loves attention\n"); printf("* Diplomatic\n* Consoling\n* Friendly and solves people's problems\n* Brave and fearless\n"); printf("* Adventurous\n* Loving and caring\n* Suave and generous\n* Revengeful\n* Moving\n"); printf("* Motivate oneself and the others\n* Sickness usually of the head and chest\n* Easily get too jealous"); break; case 5:printf("MAY\n* Stubborn and hard-hearted\n* Strong-willed and highly motivated\n* Sharp thoughts\n"); printf("* Easily angered\n* Attracts others and loves attention\n* Deep feelings\n"); printf("* Beautiful physically and mentally\n* Firm standpoint\n* Easily influenced\n"); printf("* Needs no motivation\n* Easily consoled\n* Systematic (left brain)\n* Loves to dream\n"); printf("* Strong clairvoyance\n* Good debating skills\n* Good physical\n* Weak breathing\n"); printf("* Loves literature and the arts\n* ! Loves

traveling"); break; case 6:printf("JUNE\n* Thinks far with vision\n* Easily influenced by kindness\n* Polite and soft-spoken\n"); printf("* Having lots of ideas\n* Sensitive\n* Active mind\n* Hesitating\n"); printf("* Tends to delay\n* Choosy and always wants the best\n* Temperamental\n* Funny and humorous\n"); printf("* Loves to joke\n* Good debating skills\n* Talkative\n* Abiding\n* Able to show character\n"); printf("* Easily hurt\n* Prone to getting colds\n* Loves to dress up"); break; case 7:printf("JULY\n* Fun to be with\n* Secretive\n* Difficult to fathom and to be understood\n"); printf("* Quiet unless excited or tensed\n* Takes pride in oneself \n* Has reputation\n* Easily consoled\n"); printf("* Honest\n* Concern about people's feelings\n* Tactful\n* Friendly\n* Approachable\n* Very emotional\n"); printf("* Temperamental and unpredictable\n* Not revengeful\n* Forgiving but never forgets\n"); printf("* Dislike nonsensical and unnecessary things\n* Guides others physically and mentally\n"); printf("* Sensitive and forms impressions carefully"); break; case 8:printf("AUGUST\n* Loves to joke\n* Attractive\n* Suave and caring\n* Brave and fearless\n"); printf("* Firm and has leadership qualities\n* Knows how to console others\n* Too generous and egoistic\n"); printf("* Takes high pride of oneself\n* Thirsty for praises\n* Extraordinary spirit\n* Easily angered\n"); printf("* Angry when provoked\n* Easily jealous\n* Observant\n* Loves to lead and to be led \n"); printf("* Loves to dream\n* Talented in the arts, music and defense\n* Sensitive but not petty\n"); printf("* Poo! r resistance against illnesses"); break; case 9:printf("SEPTEMBER\n* Suave and compromising\n* Careful, cautious and organized\n"); printf("* Likes to point out people's mistakes\n* Likes to criticize\n* Quiet but able to talk well\n"); printf("* Calm and cool\n* Kind and sympathetic\n* Concerned and detailed\n* Trustworthy, loyal and honest\n"); printf("* Does work well\n* Sensitive\n* Thinking\n* Good memory\n* Clever and knowledgeable\n"); printf("* Understanding\n* Secretive\n* Loves sports, leisure and traveling\n* Hardly shows emotions\n"); printf("* Tends to bottle up feelings"); break; case 10:printf("OCTOBER\n* Loves to chat\n* Loves those who loves him\n* Loves to takes things at the centre\n"); printf("* Attractive and suave\n* Inner and physical beauty\n* Does not lie or pretend\n* Sympathetic\n"); printf("* Treats friends importantly\n* Always making friends\n* Easily hur! t but recovers easily\n"); printf("* Bad tempered\n* Selfish\n* Seldom helps unless asked\n* Daydreamer\n* Decisive\n");

printf("* Strong clairvoyance\n* Loves to travel, the arts and literature\n* Soft-spoken, loving and caring\n"); printf("* Romantic\n* Touchy and easily jealous"); break; case 11:printf("NOVEMBER\n* Has a lot of ideas\n* Difficult to fathom\n* Thinks forward\n* Unique and brilliant\n"); printf("* Extraordinary ideas\n* Sharp thinking\n* Fine and strong clairvoyance\n* Can become good doctors\n"); printf("* Careful and cautious\n* Dynamic in personality\n* Secretive\n* Inquisitive\n"); printf("* Knows how to dig secrets\n* Always thinking\n* Stubborn and hard-hearted\n"); printf("* If there is a will, there is a way\n* Determined\n* Never give up\n"); printf("* Hardly become angry unless provoked"); break; case 12:printf("DECEMBER\n* Loyal and generous\n* Patriotic\n* Active in games and interactions\n"); printf("* Impatient and hasty\n* Ambitious\n* Influential in organizations\n* Fun to be with\n"); printf("* Loves to socialize\n* Loves praises\n* Loves attention\n* Loves to be loved\n"); printf("* Honest and trustworthy\n* Not pretending\n* Short tempered\n* Hates restrictions\n"); printf("* Loves to joke\n* Good sense of humor\n* Logic"); break; } printf( "\n\n\n\n"); _sleep(10000); goto f1 ; /* loop to f1 (enter birthday ) */ return 0; } int square( int mami ) { return mami * mami * mami; } int factorial(int day1, int month1,

int day2, int month2)

{ if(month2<month1) birthday */

/* month1 = month today ; month2 = month

return (30-day2+day1); else if (month2>month1) return (day1-day2); */

else return (day1-day2);

}

/* day1 = day today ; day2 = day birthday

int dog( int x,int y) { if(x>y)

/* x = day today ; y = day birthday */

return (x-y-1); else if (x

Related Documents

Programing C
August 2019 26
Programing C (madhu).pdf
November 2019 10
Mini Project 1
December 2019 10
Programing In C
April 2020 1

More Documents from "mziwanda"

May 2020 34
Teori An.pptx
June 2020 30
Kki.docx
June 2020 32
Skrip Latihan Imageri.docx
December 2019 58
Laporan Amali 04.docx
December 2019 42