Page 2 of 6 FirstFirst 12345 ... LastLast
Results 13 to 24 of 61

Thread: Class # 1.(3.1) => Data types

  1. #13
    afzalahmed is offline Senior Member+
    Last Online
    29th August 2013 @ 08:53 PM
    Join Date
    26 Feb 2007
    Age
    39
    Posts
    31
    Threads
    6
    Credits
    1,070
    Thanked
    0

    Default bohat achy

    thx

  2. #14
    Join Date
    02 Mar 2007
    Location
    Multan, Pakistan
    Age
    28
    Posts
    125
    Threads
    18
    Thanked
    0

    Default

    Welldone bhai........

  3. #15
    mani_jamo is offline Senior Member+
    Last Online
    13th June 2010 @ 10:52 AM
    Join Date
    15 Dec 2007
    Posts
    225
    Threads
    4
    Credits
    0
    Thanked
    0

    Default

    Thank you

  4. #16
    Faraan2008 is offline Senior Member+
    Last Online
    21st February 2017 @ 01:00 AM
    Join Date
    28 Aug 2007
    Posts
    312
    Threads
    9
    Credits
    983
    Thanked
    4

    Default

    aap ka boht SHUNNKRIYAAAAAAAAAAAAAAA

  5. #17
    szaib's Avatar
    szaib is offline Senior Member+
    Last Online
    23rd December 2009 @ 01:12 AM
    Join Date
    19 Sep 2008
    Age
    34
    Posts
    339
    Threads
    70
    Credits
    1,045
    Thanked
    0

    Default

    nice bro..... god bless you

  6. #18
    PrinceOfPersia's Avatar
    PrinceOfPersia is offline Advance Member
    Last Online
    27th January 2020 @ 10:21 AM
    Join Date
    06 Nov 2006
    Posts
    856
    Threads
    56
    Credits
    144
    Thanked
    25

    Default

    BHt aachy bhai bat samajh may a rhi hy


  7. #19
    zeeshanmm's Avatar
    zeeshanmm is offline Senior Member+
    Last Online
    18th November 2017 @ 06:48 PM
    Join Date
    27 Oct 2008
    Posts
    73
    Threads
    17
    Credits
    963
    Thanked
    0

    Default


  8. #20
    munnawar is offline Senior Member+
    Last Online
    10th November 2015 @ 03:52 PM
    Join Date
    02 Dec 2008
    Age
    39
    Posts
    45
    Threads
    0
    Credits
    1,070
    Thanked
    2

    Smile

    koe tips bta 2 kisi bi software ki like urdu inpage word excel corel drow photo shop and keyboard ki short kat's hon
    if u can?

  9. #21
    javeria riaz is offline Junior Member
    Last Online
    18th August 2009 @ 08:19 PM
    Join Date
    06 May 2009
    Age
    38
    Posts
    2
    Threads
    0
    Credits
    830
    Thanked
    0

    Default

    plz ager kesi k pass moeed bhai k C++ k complete notes rar main hain tou plz muj dy dyn.thnx in advance

  10. #22
    Rahi's Avatar
    Rahi is offline Senior Member+
    Last Online
    1st December 2016 @ 10:18 AM
    Join Date
    28 Dec 2008
    Location
    Karachi
    Age
    66
    Posts
    2,142
    Threads
    12
    Credits
    32
    Thanked
    109

    Default

    Assalam-o-Alykum

    Nice Edu.

  11. #23
    Join Date
    06 Dec 2008
    Location
    Hearts of people...
    Age
    33
    Posts
    315
    Threads
    16
    Credits
    0
    Thanked
    5

    Cool

    Quote Naveed Rasheed said: View Post
    great work yaaaaaaaaaaaaaar Excellent
    han g han g
    UETIANSSS ROCKKKKKKK

  12. #24
    BSCS is offline Junior Member
    Last Online
    5th April 2012 @ 11:22 AM
    Join Date
    01 Jul 2009
    Age
    34
    Posts
    15
    Threads
    3
    Credits
    0
    Thanked
    0

    Default calender in c+++

    #include "conio.h"
    #include "stdlib.h"
    #include "dos.h"
    #include "string.h"
    #include "stdio.h"

    void draw(int, int); //DRAWS BOX WITH MONTH & YEAR IN HEADER
    void show_time(); //DISPLAYS CURRENT TIME IN FOOTER OF BOX
    void print_cal( int, int); //PRINTS DATES WITHIN BOX
    int getkey(); //SCANS USER KEY AND RETUEN ITS SCAN CODE
    int first_day( int, int ); //DETEMINES FIRST DAY OF MONTH
    int today;

    void main()
    {
    int year, month;
    char ch;
    struct date d;
    getdate(&d); //RETUNS CURRENT DATE
    year = d.da_year;
    month = d.da_mon - 1;
    today = d.da_day - 1; //GET CURRENT DATE
    print_cal(year, month); //PRINTS CALENDER OF CURRENT MONTH
    flushall();
    while((ch = getkey()) != 1) //KEEP TRACK OF KEYS UNTILL 'ESC' PRESSED
    {
    switch(ch)
    {
    case 72: year++; //UP ARROW KEY
    break;
    case 80: year--; //DOWN ARROW KEY
    break;

    case 77: month++; //RIGHT ARROW KEY
    if(month > 11)
    {
    month = 0;
    year++;
    }s
    break;
    case 75: month--; //LEFT ARROW KEY
    if(month < 0)
    {
    month = 11;
    year--;
    }
    break;
    }
    print_cal(year, month); //PRINTS CALENDER OF CHANGED MONTH OR YEAR
    }
    }
    void show_time()
    {
    struct time t;
    while(!kbhit())
    {
    textcolor(YELLOW);
    gettime(&t); //GET CURRENT TIME
    gotoxy(22,2);
    if(t.ti_hour < 13)
    printf(" CURRENT TIME => %2d:%02d:%02d AM",t.ti_hour, t.ti_min,
    t.ti_sec);
    else
    {
    t.ti_hour -= 12;
    printf(" CURRENT TIME => %2d:%02d:%02d PM",t.ti_hour, t.ti_min,
    t.ti_sec);
    }

    delay(1000);
    }
    }

    int first_day(int year, int month) //DETEMINES FIRST DAY OF MONTH
    {
    int mdays[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304,
    334};
    int lpyear = ((year-1900)/4) + ((year-1900)/400) - ((year-1900)/100);
    long unsigned days = ((year-1900)*365) + lpyear + mdays[month];
    return days % 7;
    }
    int getkey() //SCANS USER KEY AND RETURN ITS SCAN CODE
    {
    union REGS i,o;
    while(!kbhit())
    ;
    i.h.ah = 0;
    int86(22,&i,&o);
    return(o.h.ah);
    }
    void draw(int year, int month) //DRAWS BOX WITH MONTH & YEAR IN HEADER
    {
    char *mo[] = { "January", "Feburary", "March", "April",
    "May", "June", "July", "August", "September",
    "October", "November", "December" };
    char *day[] = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
    int i, j;
    int ro = 205, co = 186; //GARPH CHAR 205 '�', 186 'º'
    clrscr();
    gotoxy(16, 8);
    printf("USE ARROW KEYS TO NAVIGATE AND ESC KEY TO CLOSE");
    for( i = 16; i <= 65; i++)
    { gotoxy(i,10);
    printf ("%c",ro);
    gotoxy(i,14);
    printf ("%c",ro);
    gotoxy(i,36);
    printf ("%c",ro);
    gotoxy(i,40);
    printf ("%c",ro);
    }
    for(i = 11; i <= 39; i++)
    { gotoxy(15,i);
    printf ("%c",co);
    gotoxy(66,i);
    printf ("%c",co);
    }
    gotoxy(15,10);
    printf("%c",201); //GARPH CHAR 201 'É'
    gotoxy(66,10);
    printf("%c",187); //GARPH CHAR 187 '»'
    gotoxy(15,40);
    printf("%c",200); //GARPH CHAR 200 'È'
    gotoxy(66,40);
    printf("%c",188); //GARPH CHAR 188 '¼'
    gotoxy(15,14);
    printf("%c",204); //GARPH CHAR 204 'Ì'
    gotoxy(66,14);
    printf("%c",185); //GARPH CHAR 185 '¹'
    gotoxy(15,36);
    printf("%c",204); //GARPH CHAR 204 'Ì'
    gotoxy(66,36);
    printf("%c",185); //GARPH CHAR 185 '¹'

    textcolor(YELLOW + BLINK);
    int hed_sp = 16 +((49 - (strlen(mo[month]) + 5))/2); //ALLIGN HEADER
    TO
    CENTER
    gotoxy(hed_sp,12);
    cprintf("%s %d",mo[month],year);
    window(16,15,65,35);
    clrscr();
    for(i=1, j = 0; i<49; i+=7,j++) //PRINT DAY NAMES
    {
    if(i < 7)
    textcolor(RED); // FOR SUNDAY
    else
    textcolor(YELLOW); //OTHER THAN SUNDAY
    gotoxy(i,3);
    cprintf("%5s",day[j]);
    }
    }
    void print_cal(int year, int month)
    {
    int i, j, start, count, limit;
    textmode(64);
    start = first_day(year, month);
    count = 0, limit = 31;
    draw(year, month);
    if( month == 3 || month == 5 || month == 8 || month == 10 )
    limit = 30; //FOR APRIL, JUNE, SEPT, NOV
    if(month == 1 ) //FOR FEB
    limit = (year% 4==0 && year%100 != 0 || year%400==0)? 29: 28;
    for(j=7; j< 20; j+=3) //ROW COUNTER
    {
    for(i=1; i<49; i+=7) //COLUMN COUNTER
    {
    if(i < 7)
    textcolor(RED); //DATES ON SUNDAY
    else
    textcolor(YELLOW);
    gotoxy(i,j);
    if(start)
    start--; //EMPTY SPACES TILL NUMBERING STARTS
    else
    {
    if(count == today) //HILIGHT CURRENT DATE
    {
    textcolor(BLUE);
    textbackground(YELLOW);
    }
    else
    {
    textcolor(YELLOW);
    textbackground(BLACK);
    }
    cprintf("%4d",count+1); //PRINT DATE
    count++;
    }
    if(count >= limit)
    break;
    }
    }
    if(count <= 30 && count < limit) //FOR PRINTING IN FIRST ROW IF ALL
    ROWS
    EXUASTED
    { for(i=1; i<49; i+=7)
    {
    if(i < 7)
    textcolor(RED);
    else
    textcolor(YELLOW);
    gotoxy(i,7);
    if(count == today)
    {
    textcolor(BLUE);
    textbackground(YELLOW);
    }
    else
    {
    textcolor(YELLOW);
    textbackground(BLACK);
    }
    cprintf("%4d",count+1);
    count++;
    if(count >= limit)
    break;
    }
    }
    window(16,37,65,39); //SETS WINDOW TO BOTTOM OF BOX
    show_time(); //SHOWS TIME
    }

Page 2 of 6 FirstFirst 12345 ... LastLast

Similar Threads

  1. Replies: 24
    Last Post: 4th March 2019, 06:29 PM
  2. Replies: 8
    Last Post: 14th March 2016, 11:02 PM
  3. Types of Data
    By aruba195 in forum Computer Articles
    Replies: 14
    Last Post: 25th February 2016, 05:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •