TC

classic Classic list List threaded Threaded
44 messages Options
123
Reply | Threaded
Open this post in threaded view
|

TC

Datamex
Administrator
Reply | Threaded
Open this post in threaded view
|

Re: TC

elanie saranillo
Reply | Threaded
Open this post in threaded view
|

Re: TC

christine joy layco
In reply to this post by Datamex
include<stdio.h>
#include<conio.h>
main()
{
     textbackground(GREEN);
     textcolor(12+BLINK);
     clrscr();
     gotoxy(32,14);
     cprintf("**********************************");
     gotoxy(65,12);
     cprintf("*");
     gotoxy(30,12);
     cprintf("*");
     gotoxy(32,10);
     cprintf("**********************************");
     textcolor(BLUE);
     gotoxy(34,12);
     cprintf("LEDESMA R VILLAMOR IT BATCH1");



     getch();
}
Reply | Threaded
Open this post in threaded view
|

Re: TC

trixie celario
In reply to this post by Datamex
#include<stdio.h>
#include<conio.h>
main()

{
  textbackground(3);
  textcolor(13+BLINK);
  clrscr();
  gotoxy(29,12);
  printf("Trixe Dein M. Celario");
  gotoxy(33,13);
  printf("BSIT Batch 1");
  gotoxy(27,11);
  printf("*************************");
  gotoxy(27,14);
  printf("*************************");
  gotoxy(27,12);
  printf("*");
  gotoxy(27,13);
  printf("*");
  gotoxy(51,13);
  printf("*");
  gotoxy(51,12);
  printf("*");
  getch();



}
Reply | Threaded
Open this post in threaded view
|

Re: TC

trixie celario
#include<stdio.h>
#include<conio.h>
main()

{
 char name;
 clrscr();
 printf("Hello what is your name?\n",&name);
 scanf("%s", &name);
 printf("How old are you?\n", &name);
 scanf("%i", &name");
 printf("When is your birthday?\n", &name);
 scanf("%s,%i", &name);
 printf("Where do you live?\n",&name);
 scanf("%s.%i");
 printf("Who are your parents?\n",&name);
 scanf("%s",&name);
 printf("What is your contact number?\n",&name);
 scanf("%i",&name);
 printf("What is your email address?\n",&name);
 scanf("%s",&name);
 getch();





}
Reply | Threaded
Open this post in threaded view
|

Re: TC

marjorie
In reply to this post by Datamex
#include<stdio.h>
#include<conio.h>
main()
{
        textbackground(GREEN);
        clrscr();
        textcolor(WHITE+BLINK);
        gotoxy(30,10);
        cprintf("********************");
        gotoxy(30,11);
        cprintf("*");
        gotoxy(49,11);
        cprintf("*");
        gotoxy(30,12);
        cprintf("*");
        gotoxy(49,12);
        cprintf("*");
        gotoxy(30,13);
        cprintf("********************");
        textcolor(GREEN);
        gotoxy(32,11);
        cprintf("MARJORIE CLEMENTE");
        textcolor(BLUE);
        gotoxy(38,12);
        cprintf("BSIT");
        getch();
}
Reply | Threaded
Open this post in threaded view
|

Re: TC

marjorie
#include<stdio.h>
int main()
{
        int a,b,c;
        clrscr();
        printf("Hi!, what is your name?\n");
        scanf("%d");
        printf("Nice name Marjorie Clemente, How are you?\n");
        scanf("%s\n");
        printf("Wow, Nice to met you!\n");
        scanf("%s\n");
        return 0;

}
Reply | Threaded
Open this post in threaded view
|

Re: 3rd act

marjorie
In reply to this post by marjorie
#include<stdio.h>
#include<conio.h>
void  main()
{
        int a,b,c;
        int mas malaki;
        clrscr();
        printf("enter the 1st number");
        scanf("%d",&a);
        printf("enter the 2nd number");
        scanf("%d",&b);
        printf("enter the 3rd number");
        scanf("%d",&c);

                if(a>b)
                      {
                                if(a<c)mas malaki=a;
                                        else mas malaki=c;
                      }
                else
                      {
                                if(b>c)mas malaki=b;
                                        else mas malaki=c;
                      }
                printf("Biggest of 14 numbers is:%d\n",mas malaki);
                getch();
}
Reply | Threaded
Open this post in threaded view
|

Re: 5th act.

marjorie
In reply to this post by marjorie
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<process.h>
#include<stdlib.h>

void enemycar(int x, int y)
 {
  setcolor(15);
  rectangle(x+1,y,x+49,y+100);
  rectangle(x+1,y+25,x+49,y+75);
  setfillstyle( SOLID_FILL,YELLOW);
  floodfill((x+x+50)/2,(y+y+100)/2,15);
  setfillstyle(1,YELLOW);
  floodfill((x+x+50)/2,(y+y+40)/2,15);
  floodfill((x+x+50)/2,(y+y+160)/2,15);

  }

void mycar(int x, int y)
 {
  setcolor(15);
  rectangle(x+1,y,x+49,y+100);
  rectangle(x+1,y+25,x+49,y+75);
  setfillstyle(5,RED);
  floodfill((x+x+50)/2,(y+y+100)/2,15);
  setfillstyle(2,BLUE);
  floodfill((x+x+50)/2,(y+y+40)/2,15);
  floodfill((x+x+50)/2,(y+y+160)/2,15);
  }



void myclear(int x,int y)
 {
 setcolor(8);
 rectangle(x+1,y,x+49,y+100);
 rectangle(x+1,y+25,x+49,y+75);
 setfillstyle(SOLID_FILL,8);
 floodfill((x+x+50)/2,(y+y+100)/2,8);
 floodfill((x+x+50)/2,(y+y+40)/2,8);
 floodfill((x+x+50)/2,(y+y+160)/2,8);
 }


 void enemyclear(int x,int y)
 {
 setcolor(8);
 rectangle(x+1,y,x+49,y+100);
 rectangle(x+1,y+25,x+49,y+75);
// line(x+1,y,x+1,y+100);
// delay(500);
 }

void main()
 {
 int gdriver = DETECT,gmode;
 initgraph(&gdriver,&gmode,"C:\\Turboc3\\BGI");

  int x=300,y=350,ch,life=3,score=0;
  char choice;
  cout<<"\n\n\n\n\n\t\t\t* THUNDER RACER *";
  cout<<"\n\t\t\t ---------------";
  cout<<"\n\n\tLong long ago the state of Valencia was attacked by the";
  cout<<"\n\n\tenemies and were defeated. Every soldier and citizen was";
  cout<<"\n\n\tkilled except the beautiful princess Cindrella  and you";
  cout<<"\n\n\twho survived. Enemies want to kill her and she is in your";
  cout<<"\n\n\tcar right now. If you have the guts save her from enemies'";
  cout<<"\n\n\tcars and marry her.";
  cout<<"\n\n\tSo all the best...";
  delay(200);
  for(int m=1;m<25;m++)
    for(int n=1;n<80;n++) {
        gotoxy(n,m);
        cout<<" ";
        }
  setcolor(RED);
  rectangle(20,60,200,120);
  rectangle(20,300,200,420);
  gotoxy(5,21);
  cout<<"Only Aditya & Anshul";
  gotoxy(5,22);
  cout<<"have saved her till";
  gotoxy(5,23);
  cout<<"now. So you can be";
  gotoxy(5,24);
  cout<<"the 3-rd";
  rectangle(249,0,401,getmaxy());
  setfillstyle(SOLID_FILL,8);
  floodfill(325,getmaxy()/2,RED);
  setcolor(RED);
  rectangle(20,200,200,250);
  gotoxy(5,15);
  cout<<"Press <Esc> to Exit";
  for(int level=1;(level<=5)&&(life>0);level++){
    if(level==1){
      gotoxy(5,5);
      cout<<"Your War Starts Now";
      gotoxy(5,7);
      cout<<"All the best";
      delay(500);
      gotoxy(5,5);
      cout<<"                    ";
      gotoxy(5,7);
      cout<<"            ";
      }
     else {
         gotoxy(5,5);
         cout<<"Next level.";
         delay(500);
         gotoxy(5,5);
         cout<<"           ";
         }
  for(int i=0;(i<15)&&(life>0);i++) {
    if((level==5)&&(i==14)){
       gotoxy(5,5);
       cout<<"You have won";
       gotoxy(5,6);
       cout<<"Wanna continue <y/n>";
       choice = getch();
       if ((choice=='y')||(choice=='Y'))
        main();
       else
        exit(0);
       }
    setcolor(RED);
    rectangle(420,125,600,175);
    gotoxy(55,10);
    cout<<"Level = "<<level;
    rectangle(420,250,600,300);
    gotoxy(55,18);
    cout<<"Lives = "<<life;
    rectangle(420,350,600,400);
    gotoxy(55,24);
    cout<<"Score = "<<score;
    int accident=0;
    int y1=1,x1=250+((rand()%3)*50);
    int y2=1,x2=250+((rand()%3)*50);
    score += 10;
    while(y1<getmaxy()-1)
    {

        enemyclear(x1,y1);
        enemyclear(x2,y2);
        y1++;
        y2++;
        if(accident == 1)
            break;
        enemycar(x1,y1);
        enemycar(x2,y2);
        mycar(x,y);
        delay(5-level);
        if(kbhit())
        {
            mycar(x,y);
            ch=getch();
            switch(ch) {
            case 27: exit(0);
            break;
            case 75:myclear(x,y);
                if(x>250)
                    x=x-50;
                    if((x==x1)||(x==x2))
                        if( ( ((y-y1)<100)&&((y-y1)>0) ) || ( ((y-y2)<100)&&((y-y2)>0) ) )
                        {
                            accident=1;
                            x=x+50;
                            mycar(x,y);
                            goto Next1;
                        }
                 mycar(x,y);
            break;
            case 77:myclear(x,y);
                if(x<350)
                    x=x+50;
                    if((x==x1)||(x==x2))
                        if( ( ((y-y1)<100)&&((y-y1)>0) ) || ( ((y-y2)<100)&&((y-y2)>0) ) )
                        {
                            accident=1;
                            x=x-50;
                            mycar(x,y);
                            goto Next1;
                        }
                mycar(x,y);
            break;
            case 72:myclear(x,y);
                if(y>0)
                      y=y-5;
                mycar(x,y);
             break;
             case 80:myclear(x,y);
                if(y<getmaxy()-105)
                    y=y+5;
                mycar(x,y);
             break;
            }
        }
        if((x==x1)||(x==x2))
            if( ( ((y-y1)<100)&&((y-y1)>0) ) || ( ((y-y2)<100)&&((y-y2)>0) ) )
                accident=1;



      Next1:
      if(accident==1){
        life =life-1;
        score -= 10;
        if(life==0) {
         gotoxy(5,5);
         cout<<"GAME OVER ";
         gotoxy(5,6);
         cout<<"You could not save";
         gotoxy(5,7);
         cout<<"her";
         break;
         }
        gotoxy(5,5);
        cout<<"You have lost 1 life";
        delay(500);
        gotoxy(5,5);
        cout<<"                    ";
        }
        }
  }
  }
 getch();
 }
c++
Reply | Threaded
Open this post in threaded view
|

Re: act1-2

marvin navarrosa
nclude<stdio.h>
int main()
{
                char name;
                clrscr();
                printf("Hi! What is your name?\n");
                scanf("%d%d%d%d%d%d%d%d%");
                printf("How are you?\n");
                scanf("%s\n");
                printf("Where do you live?\n");
                scanf("%s\n");
                printf("How old are you?\n");
                scanf("%s\n");
                printf("What is the name of your parents?\n");
                scanf("%s\n");
                printf("What is your contact number?\n");
                scanf("%s\n");
                printf("What is your email add?\n");
                scanf("%s\n");
                getch();

}
Reply | Threaded
Open this post in threaded view
|

Re: TC

Romulo Agbon
This post was updated on .
In reply to this post by Datamex
Reply | Threaded
Open this post in threaded view
|

Re: TC

mia glyzza segura
In reply to this post by Datamex
#include<stdio.h>
#include<conio.h>
main()
{
  char name;
  textbackground(RED);
  clrscr();
  printf("Hello ,what is your name?\n", &name);
  scanf("%s", &name);
  printf("How are you?\n", &name);
  scanf("%s", &name);
  printf("How old are you?\n", &name);
  scanf("%s", &name);
  printf("When is your birthday?\n", &name);
  scanf("%s", &name);
  printf("What is the name of your parent's?\n", &name);
  scanf("%s", &name);
  printf("Where do you live?\n", &name);
  scanf("%s", &name);
  printf("Can i get your contact number?\n", &name);
  scanf("%s", &name);
  printf("Can i get your email add.?\n", &name);
  scanf("%s", &name);
  getch();




}
Reply | Threaded
Open this post in threaded view
|

Re: TC

cristy lacaba
In reply to this post by Datamex
#include<stdio.h>
#include<conio.h>
main()
{
  char name;
  textbackground(3);
  clrscr();
  printf("Hello ,what is your name?\n", &name);
  scanf("%s", &name);
  printf("How are you?\n", &name);
  scanf("%s", &name);
  printf("How old are you?\n", &name);
  scanf("%s", &name);
  printf("When is your birthday?\n", &name);
  scanf("%s", &name);
  printf("What is the name of your parent's?\n", &name);
  scanf("%s", &name);
  printf("Where do you live?\n", &name);
  scanf("%s", &name);
  printf("Can i get your contact number?\n", &name);
  scanf("%s", &name);
  printf("Can i get your email add.?\n", &name);
  scanf("%s", &name);
  getch();




}
Reply | Threaded
Open this post in threaded view
|

Re: TC

cristy lacaba
In reply to this post by Datamex
#include<stdio.h>
#include<conio.h>
main()
{
        textbackground(GREEN);
        clrscr();
        textcolor(BLUE+BLINK);
        gotoxy(30,10);
        cprintf("********************");
        gotoxy(30,11);
        cprintf("*");
        gotoxy(49,11);
        cprintf("*");
        gotoxy(30,12);
        cprintf("*");
        gotoxy(49,12);
        cprintf("*");
        gotoxy(30,13);
        cprintf("********************");
        textcolor(GREEN);
        gotoxy(32,11);
        cprintf("cristy lacaba");
        textcolor(8);
        gotoxy(38,12);
        cprintf("BSIT");
        getch();
}
Reply | Threaded
Open this post in threaded view
|

Re: TC

ledesma villamor
In reply to this post by Datamex
#include<stdio.h>
#include<conio.h>
main()
{

   char name;
   clrscr();
   printf("hello what is your name?\n",&name);
   scanf("%s",&name);
   printf("hello how old are you?\n",&name);
   scanf("%s",&name);
   printf("where did you live?\n",&name);
   scanf("%s",&name);
   printf("Give me your contact number\n",&name);
   scanf("%s",&name);
   printf("What is your email address\n",&name);
   scanf("%s",&name);
   printf("What are the name of your parents\n",&name);
   scanf("%s%s%s%s",&name);
   return 0;

}
Reply | Threaded
Open this post in threaded view
|

ACTIVITY #1

jaredmabini001
In reply to this post by Datamex
#include<stdio.h>
#include<conio.h>
main()
{
 textbackground(RED);
 clrscr();
 textcolor(BLACK);
 gotoxy(30, 12);
 cprintf("REY-MART P. REAS");
 textcolor(GREEN+BLINK);
 gotoxy(29, 13);
 cprintf("******************");
 gotoxy(29, 11);
 cprintf("******************");
 gotoxy(29, 12);
 cprintf("*");
 gotoxy(46, 12);
 cprintf("*");
 getch();
 }
Reply | Threaded
Open this post in threaded view
|

Re: TC

ledesma villamor
In reply to this post by Datamex
#include <stdio.h>
#include <conio.h>

void main(void)
{
char ch;
int tries = 0;
int win_flag = 0;

clrscr();


printf("Guess the letter: ");

do
{
    ch = getch();
    printf("%c", ch);
    tries++;
    if (ch == 'a')
        win_flag = 1;
    else
        win_flag = 0;
}
while (tries <= 3 || win_flag == 1);

if (tries <= 3)
    printf("\nGame over.");
else if (win_flag == 1)
    printf("\nYou win!");

getch();
}
Reply | Threaded
Open this post in threaded view
|

Re: TC

reymart reas activity #3
In reply to this post by Datamex
#include<stdio.h>
#include<conio.h>
void main()
{
        int a,b,c;
        int gutiayay;
        clrscr();
        printf("ENTER THE 1ST NUMBER:");
        scanf("%d",&a);
        printf("ENTER THE 2ND NUMBER:");
        scanf("%d",&b);
        printf("ENTER THE 3RD NUMBER:");
        scanf("%d",&c);

                if (a<b)
                        {
                                if (a<c)gutiayay=a;
                                else gutiayay=c;
                        }
                else
                        {
                                if (b<c)gutiayay=b;
                                else gutiayay=c;
                        }
        printf("Smallest of 3 number is :%d\n",gutiayay);
        getch();
}
Reply | Threaded
Open this post in threaded view
|

Re: TC

reymart reas activity #3
In reply to this post by Datamex
#include<stdio.h>
#include<conio.h>
main()
{
 textbackground(RED);
 clrscr();
 textcolor(BLACK);
 gotoxy(30, 12);
 cprintf("REY-MART P. REAS");
 textcolor(GREEN+BLINK);
 gotoxy(29, 13);
 cprintf("******************");
 gotoxy(29, 11);
 cprintf("******************");
 gotoxy(29, 12);
 cprintf("*");
 gotoxy(46, 12);
 cprintf("*");
 getch();
 }
Reply | Threaded
Open this post in threaded view
|

Re: TC

reymart reas activity #3
In reply to this post by Datamex
/* the conversation*/

#include<stdio.h>
#include<conio.h>

main()
{
char name;
clrscr();
gotoxy(25, 1);
textcolor(YELLOW);
cprintf("EAT ALL! IF YOU CAN!?");
gotoxy(33, 1);
cprintf("RESTAURANT");
gotoxy(1,3 );
textcolor(RED+BLINK);
cprintf(" FOOD: EPIS BURGER, AMPALAYA BURGER, KANGKONG BURGER, BLUE CHEESE BURGER W/ NO BREAD");
gotoxy(1,4);
textcolor(YELLOW+BLINK);
cprintf("DRINK: EGGTEA, COCACOLA PEPSI, VOLCANO DEW, CR");
gotoxy(1, 6);
printf(" Inside the restaurant, there is a costumer taking an order");
gotoxy(1,8);
printf("CREW: what can i have you?\n", &name);
gotoxy(1, 9);
printf("COSTUMER:", &name);
scanf("%s", &name);
gotoxy(1, 10);
printf("CREW: how about your drink?!\n", &name);
gotoxy(1, 11);
printf("COSTUMER:", &name);
scanf("%s", &name);
gotoxy(1, 12);
printf("CREW: okey, i'll gonna get your order to serve it to you.", &name);
gotoxy(1, 13);
printf("COSTUMER:", &name);
scanf("%s", &name);
return 0;
}
123