Translate

quarta-feira, 4 de dezembro de 2013

Programa completo agenda usando arquivos em C++ cria, lê, busca, exclui

#include <iostream>
#include <fstream>
#include <string.h>
#include <stdio.h>
#include <conio.h>

using namespace std;

void busca(){
    char nome[100];
    char nom_concat[100] = "Nome: ";
    char nom_busca[205];
    char *result; 
    int i;
    char Linha[100];
    FILE *agenda;
   
   
    // Abre um arquivo TEXTO para LEITURA 
    agenda = fopen("j:\\Agenda.txt", "r+");
    if (agenda == NULL)  // Se houve erro na abertura 
    {    printf("Problemas na abertura do  arquivo\n");    
        
    }
   
    cout << "Digite o nome p/ buscar: ";
    cin >> nome;
   
    strcat( nome, "\n");
    strcat( nom_concat, nome );
   
    while (!feof(agenda))
    {
        // Lê uma linha (inclusive com o '\n')     
        result = fgets(Linha, 100, agenda); 
   
        // o 'fgets'  lê até 99 caracteres ou até o '\n'     
        if(strcmp(Linha,nom_concat)==0){
          printf("Usuário encontrado \n");
          printf("Linha %d : %s",i,Linha);
          getch();
        }
    }
       
    fclose(agenda);
    getch();   
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <stdio.h>
#include <conio.h>

using namespace std;

void exclui(){
    int r;
    char sim[2];
    FILE *agenda;
    cout << "Deseja realmente excluir o arquivo? (s - n): ";
    cin >> sim;

    if(stricmp(sim,"s") == 0){
        remove("j:\\Agenda.txt");
    }
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <stdio.h>
#include <conio.h>

using namespace std;

void le(){
    FILE *agenda;
    char ch;
    ifstream fin("j:\\Agenda.txt"); // Abre arquivo para leitura
    // Enquanto não for fim de arquivo:
    while(fin.get(ch)){ // lê um caracter do arquivo
    cout << ch;}
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <stdio.h>
#include <conio.h>
#include <cstdlib>
#include <cstring>
#include <stdlib.h>

using namespace std;

struct contato{
    char nome[40];
    char end[100];
    char tel[15];
};

void busca();
void le();
void exclui();

int main(int, char **) {
   
    int opcao;
    FILE *agenda;
   
    do{
   
        cout <<"\n\n|------------Menu de opções------------|\n\n";
        cout <<"1 - Criar nova agenda\n";
        cout <<"2 - Cadastrar um contato\n";
        cout <<"3 - Excluir a agenda\n";
        cout <<"4 - Buscar um contato pelo nome\n";
        cout <<"5 - Imprimir a agenda\n";
        cout <<"6 - Encerrar o programa\n\n";
        cout <<"\n|--------------------------------------|\n\n\n";
        cout <<"Informe uma opção:  ";
        cin >> opcao;
      
            switch(opcao){
              
                case 1:
                    agenda = fopen ("i:\\Agenda.txt", "w");
                                     
                    if (agenda == NULL) {
                       printf ("Houve um erro ao abrir o arquivo.\n");
                       return 1;
                    }
                  
                    printf ("\n\nAgenda criada com sucesso!\n\n");
                    fclose(agenda);
                    break;
                  
                case 2:
                    int x;
                    agenda = fopen ("j:\\Agenda.txt", "a");
                  
                    if (agenda == NULL) {
                       printf ("Houve um erro ao abrir o arquivo.\n");
                       return 1;
                    }
                  
                    cout << "\nInforme a quantidade que deseja cadastrar: ";
                    cin >> x;
                  
                    for(int i=0; i<x; i++){
                        contato cont[x];
                        cout<<"\nInforme o nome: ";
                        cin>> cont[i].nome;
                        cout<<"Informe o endereço: ";
                        cin>> cont[i].end;
                        cout<<"Informe o telefone: ";
                        cin>> cont[i].tel;
                        fprintf(agenda,"\nNome: %s\n",cont[i].nome);
                        fprintf(agenda,"Endereço: %s\n",cont[i].end);
                        fprintf(agenda,"Telefone: %s\n",cont[i].tel);
                    }
                    fclose (agenda);
                    break;
                  
              
                case 3:
                    exclui();
                    break;
                  
                      
                case 4:  
                    busca();
                      break;
              
                  
                case 5:
                    le();
                    break;  
      
            }  
    }    while(opcao != 6);
        cout << "\n\n\n\ Programa encerrado!";          
}



Programa em C++ usando arquivos que cria e lê um arquivo

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

using namespace std;

struct contato{
    char nome[40];
    char end[100];
    char tel[15];
};

void busca();
void le();
void exclui();

int main(int, char **) {
   
    int opcao;
    FILE *arquivo;
   
    do{
   
        cout <<"\n\n|------------Menu de opções------------|\n\n";
        cout <<"1 - Criar um arquivo\n";
        cout <<"2 - Ler um arquivo\n";
        cout <<"3 - Encerrar o programa\n\n";
        cout <<"\n|--------------------------------------|\n\n\n";
        cout <<"Informe uma opção:  ";
        cin >> opcao;
       
            switch(opcao){
               
                case 1:
               
                    arquivo = fopen ("D:\\Arquivo.txt", "w");
                    if (arquivo == NULL) {
                       printf ("Houve um erro ao abrir o arquivo.\n");
                       return 1;
                    }
                    printf ("Arquivo criado com sucesso.\n");
                    fprintf(arquivo,"Teste gravação");
                    fclose (arquivo);
                    break;
                   
                case 2:
                    int c;

                    if((arquivo = fopen("D:\\arquivo.txt", "r")) == NULL)
                    {
                        perror("Erro: fopen");
                        exit(EXIT_FAILURE);
                    }
               
                    while((c = fgetc(arquivo)) != EOF)
                        printf("Caractere lido: %c\n", c);
               
                   
                    fclose(arquivo);
                    break;
                       
       
            }   
    }    while(opcao != 3);
        cout << "\n\n\n\Programa encerrado!";           
}

Metodo bolha de busca em c++ completo com menude opções

// Busca simples usando método da bolha

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#define qtde 8

using namespace std;

main()
{
          int vetor[qtde], x = 0,
      y = 0,
      aux = 0;
   
      int opcao;
    FILE *agenda;
   
    do{
   
        cout <<"\n\n|------------Menu de opções------------|\n\n";
        cout <<"1 - Criar o vetor\n";
        cout <<"2 - Ordenar de forma cresceste\n";
        cout <<"3 - Ordenar de forma decrescente\n";
        cout <<"4 - Encerrar o programa\n\n";
        cout <<"\n|--------------------------------------|\n\n\n";
        cout <<"Informe uma opção:  ";
        cin >> opcao;
       
            switch(opcao){
               
                case 1:
                    for( x = 0; x < qtde; x++ )
                      {
                        printf("\nEntre com um inteiro para vetor[%d]: ",x);
                        scanf("%d",&aux);
                        vetor[x] = aux;
                      }
                    break;
                   
                case 2:
                      // coloca em ordem crescente (1,2,3,4,5...) 
                      for( x = 0; x < qtde; x++ )
                      {
                        for( y = x + 1; y < qtde; y++ )
                        // sempre 1 elemento à frente
                        {
                          // se o (x > (x+1)) então o
                          //x passa pra frente (ordem crescente)
                          if ( vetor[x] > vetor[y] )
                          {
                             aux = vetor[x];
                             vetor[x] = vetor[y];
                             vetor[y] = aux;
                          }
                        }
                      } // fim da ordenação
                     
                       // exibe elementos ordenados  
                      printf("\n\n Elementos ordenados (Crescente):");
                     
                      for( x = 0; x < qtde; x++ )
                      {
                        printf("\n vetor[%d] = %d",x,vetor[x]);
                        // exibe o vetor ordenado
                      } 
                    break;
                   
               
                case 3:
                    // coloca em ordem decrescente (10,9,8,7...)
                  for( x = 0; x < qtde; x++ )
                  {
                    for( y = x + 1; y < qtde; y++ )
                    // sempre 1 elemento à frente
                    {
                      if ( vetor[y] > vetor[x] )
                      {
                         aux = vetor[y];
                         vetor[y] = vetor[x];
                         vetor[x] = aux;
                      }
                    }
                  } // fim da ordenação
                 
                  // exibe elementos ordenados
                  printf("\n\n Elementos ordenados (Decrescente):");
                 
                  for( x = 0; x < qtde; x++ )
                  {
                    printf("\n vetor[%d] = %d",x,vetor[x]);
                    // exibe o vetor ordenado
                  }
                    break;
                   
            }   
    }    while(opcao != 4);
        cout << "\n\n\n\ Programa encerrado!";       
}

Programa quicksort c++ que gera o vetor aleatório ou definido e imprime completo com o main/separa/quicksort



QUICKSORT


#include <stdio.h>
#include <stdlib.h>

int separa( int v[], int p, int r)
{
   int c = v[p], i = p+1, j = r, t;
   while (/*A*/ i <= j) {
      if (v[i] <= c) ++i;
      else if (c < v[j]) --j;
      else {
         t = v[i], v[i] = v[j], v[j] = t;
         ++i; --j;
      }
   }
   // agora i == j+1                
   v[p] = v[j], v[j] = c;
   return j;
}
-------------------------------------------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
int separa( int v[], int p, int r);
void quicksort( int v[], int p, int r)
{
   int j;                         // 1
   if (p < r) {                   // 2
      j = separa( v, p, r);       // 3
      quicksort( v, p, j-1);      // 4
      quicksort( v, j+1, r);      // 5
   }
}
-------------------------------------------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <time.h>
#define MAX 10
using namespace std;
int separa( int v[], int p, int r);
void quicksort( int v[], int p, int r);

int main(){
            int opcao;
            int vetor[MAX];
            do{
                        cout<<"\n\n\n---------------Menu de opções----------------\n";
                        cout<<"1 - Gerar vetor de numeros aleatórios\n";
                        cout<<"2 - Gerar vetor de valores definidos\n";
                        cout<<"3 - Imprimir\n";
                        cout<<"4 - Encerrar o programa\n";
                        cout<<"---------------------------------------------\n\n";
                        cout<<"Informe uma opção";
                        cin>>opcao;
                       
                        switch(opcao){
                                   case 1:
                                               int e;
                                               int ate;
                                               cout<<"Informe o final do intervalo do vetor\n";
                                               cout<<"De: 0 até : ";
                                               cin>>ate;
                                       /* inicializar o gerador de números aleatórios */
                                       srand(time(NULL));
                                       for (e=0; e<MAX; e++)
                                    {
                                /* para gerar números aleatórios de 0 a ate */
                                vetor[e] = rand() % ate;
                                    }
                                               break;
                                              
                                   case 2:
                                              
                                               for(int j = 0; j < MAX; j++)
                                                {
                                                 printf("Digite um valor: ");
                                                 scanf("%d", &vetor[j]);
                                                }
                                               break;
                                                          
                                   case 3:
                                               int i;  
                                               printf("Vetor desordenado:\n");
                                               for(i = 0; i < MAX; i++){
                                                 printf("%d ", vetor[i]);
                                               }
                                               printf("\n");  
                                              
                                               quicksort(vetor, 0, 9);
                                              
                                               printf("Vetor ordenado:\n");
                                               for(i = 0; i < MAX; i++){
                                                 printf("%d ", vetor[i]);
                                               }
                                               printf("\n");
                                               break;
                        }
           
            }while(opcao != 4);
           
            cout << "\n\n\n\ Programa encerrado!";

}

segunda-feira, 18 de novembro de 2013

Cronometro / contador regressivo em HTML e CSS

Cronometro / contador regressivo

Começa a pisca trocar de cor quando faltar 10min
Copia e cola o codigo html no Bloco de Notas e salva da seguinte forma:

nomedoarquivo.html

Copiar e cola o Código CSS los hum Documento Fazer Bloco de Notas e salva da seguinte forma:

estilo.css

Os Dois TEM Que Estar Salvo na MESMA pasta

Parte HTML

<DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="estilo.css" type="text/css" rel="stylesheet" />
<title> Documento sem título </ title>
<script>
SEGUNDOS var = ;/ 70/1800; / / Inicio fazer cronometro
função formatatempo (segs) {

min = 0;
hr = 0;
/ *
se hr <10 então hr = "0" & ​​hr
se min <10 min, em seguida = "0" & ​​min
se segs <10 então segs = "0" e segs
* /
while (segs> = 60) {
if (segs> = 60) {
segs = segs-60;
min = min +1;
}
}

while (min> = 60) {
if (min> = 60) {
min = min-60;
hr = 1 hr;
}
}
if (FC <10) {hr = "0" + h}
if (min <10) {min = "0" + min}
if (segs <10) {segs = "0" + segs}
fin = h + ":" + min + ":" + segs
voltar fin;
}


<- Função Conta () {
<- SEGUNDOS -;
!.. <- Documento getElementById ("contador") innerHTML = formatatempo (SEGUNDOS);
<-!}


Conta função () {
SEGUNDOS -;

var ritmo = formatatempo (SEGUNDOS);
if (0 min ==) {

. document.getElementById ("contador") style.color = "vermelho";

document.getElementById ("contador") innerHTML =''.;

setTimeout (function () {
document.getElementById ("contador") innerHTML = ritmo.;
}, 500
);

if (SEGUNDOS == 0) {
alert ("Tempo de Apresentação esgotado!");
n ();
stop ();
}
} Else {
document.getElementById ("contador") innerHTML = ritmo.;
}
}


Inicia a função () {
if (SEGUNDOS == 0) {
alert ("Tempo de Apresentação esgotado!");
clearInterval (intervalo);
stop ();
} Else {
intervalo = setInterval ("Conta ();", 1000);}
}


função para () {
clearInterval (intervalo);}


função zera () {
clearInterval (intervalo);
SEGUNDOS = 1800;
. document.getElementById ("contador") style.color = "branco";
. document.getElementById ("contador") innerHTML = formatatempo (SEGUNDOS);
}
</ Script>


<- <script>
SEGUNDOS var = 1800
var VELOCIDADE = 1000;
var valor = 1;
função pisca () {
SEGUNDOS -;
if (valor == 1) {
counter.innerHTML = formatatempo (SEGUNDOS);
valor = 0;
} Else {
counter.innerHTML = "";
valor = 1;
}
setTimeout ("pisca ();", VELOCIDADE);
}
</ Script> ->


<script>
local var = "cronometro"
/ * VALORES = liga UO Desliga * /

var Alerta = "Desliga"

if (screen.width == 1280 && == Screen.Height 1024)
{This.location = local + '1280x1024. Html '}

if (screen.width == 1280 && == Screen.Height 960)
{This.location = local + '1280x960. Html '}

if (screen.width == 1280 && == Screen.Height 768)
{This.location = local + '1280x768. Html '}

if (screen.width == 1280 && == Screen.Height 720)
{This.location = local + '1280x720. Html '}

if (screen.width == 1152 && == Screen.Height 864)
{This.location = local + '1152x864. Html '}

if (screen.width == 1024 && == Screen.Height 768)
{Top.location = local + '1024x768. Html '}

if (screen.width == 848 && Screen.Height == 480)
{This.location = local + '848x480. Html '}

if (screen.width == 800 && Screen.Height == 600)
{This.location = local + '800x600. Html '}

if (screen.width == 640 && Screen.Height == 480)
{This.location = local + '640x480. Html '}

if (Alerta == 'liga') {
alert ('SUAS configurações de video FORAM detectadas com Êxito:' + screen.width + '×' + Screen.Height + 'pixels \ n \ nRedirecionando ...')}
else {}

</ Script>

</ Head>

<Onload corpo = "pisca ();" >
<div id="imagem" align="center">
<div id="a"> </ div>
<div id="b"> <img src="imagens/3 Oficina Engenharia.png" width="800" height="450" ​​/> </ div>
<div id="a"> </ div>
</ Div>
<div id="dir">
<div id="logo">
</ Div>
<div id="cronometro" align="center">
<span id="counter" class="blink"> 00:30:00 </ span> <br />
        <div> <input type="button" value="Parar" onclick="para();">
        <input type="button" value="Iniciar" onclick="inicia();">    
        <input type="button" value="Recomeçar" onclick="zera();"> </ div>
     
</ Div>

</ Div>

</ Body>
</ Html>


Parte CSS

body {
margin: 0px;
border: 0px;
altura: 100%;
background-size: 100%;
font-size: 110px;
fonte: Arial, Helvetica, sans-serif;
/ * Inicio se degradam do Corpo * /
background-color: # 2F2727;
background-image: url (images / radial_bg.png);
background-position: center;
background-repeat: no-repeat;

/ * Safari 4-5, 1-9 Chrome * / / * Não é possível especificar um tamanho de porcentagem? Laaaaaame. * /
background:-webkit-gradiente (radial, centro, 0, centro, 460, a partir de (# 1a82f7), para (# 2F2727));

/ * Safari 5.1 +, Chrome 10 + * /
background:-webkit-radial-gradiente (círculo, # 1a82f7, # 2F2727);

/ * Firefox 3.6 + * /
background:-moz-radial-gradiente (círculo, # 1a82f7, # 2F2727);

/ * IE 10 * /
fundo:-ms-radial-gradiente (círculo, # 1a82f7, # 2F2727);
/ * Fim se degradam do Corpo * /}

corpo, html {
altura: 100%;
width: 100%;
}

# Imagem {
width: 65%;
altura: 100%;
float: left;
vertical-align: central;
}

# Dir {width: 35%;
altura: 100%;
float: right;}

# {Cronometro
width: 100%;
altura: 20%;
font-size: 90px;
font-family: "Arial Black", Gadget, sans-serif;
color: # FFF;
line-height: 50px;
text-decoration: blink;
}

# {Logotipo

width: 100%;}





Contador regressivo / Cronômetro </ title></font></font></p> <p> <br /> </p> <p> <font><font><script></font></font></p> <p> </p> <p> <font><font>SEGUNDOS var = 3600 ;/ / 1800; </font><font>/ / Inicio Fazer cronometro</font></font></p> <p> </p> <p> <font><font>função formatatempo (segs) {</font></font></p> <p>     </p> <p> <font><font>min = 0;</font></font></p> <p> <font><font>hr = 0;</font></font></p> <p> <font><font>/ *</font></font></p> <p> <font><font>se FC <10 entao hr = "0" e hr</font></font></p> <p> <font><font>Si min <10 min, em SEGUIDA = "0" & ​​min</font></font></p> <p> <font><font>segs si <10 Segs entao = "0" E Segs</font></font></p> <p> <font><font>* /</font></font></p> <p> <font><font>while (segs> = 60) {</font></font></p> <p> <font><font>if (segs> = 60) {</font></font></p> <p> <font><font>segs = segs-60;</font></font></p> <p> <font><font>min = min +1;</font></font></p> <p> <font><font>}</font></font></p> <p> <font><font>}</font></font></p> <p> </p> <p> <font><font>while (min> = 60) {</font></font></p> <p> <font><font>if (min> = 60) {</font></font></p> <p> <font><font>min = min-60;</font></font></p> <p> <font><font>hr = 1 Hora;</font></font></p> <p> <font><font>}</font></font></p> <p> <font><font>}</font></font></p> <p> <font><font>if (FC <10) {hr = "0" + h}</font></font></p> <p> <font><font>if (min <10) {min = "0" + min}</font></font></p> <p> <font><font>if (segs <10) {segs = "0" + segs}</font></font></p> <p> <font><font>fin = h + ":" + min + ":" + Segs</font></font></p> <p> <font><font>voltar fin;</font></font></p> <p> <font><font>}</font></font></p> <p> </p> <p> </p> <p> <font><font><- Função Conta () {</font></font></p> <p> <font><font><- SEGUNDOS -;</font></font></p> <p> <font><font>! </font><font>.. <- Documento getElementById ("contador") innerHTML = formatatempo (SEGUNDOS);</font></font></p> <p> <font><font><-!}</font></font></p> <p> </p> <p> <font><font>Conta função () {</font></font></p> <p> <font><font>SEGUNDOS -;</font></font></p> <p> </p> <p> <font><font>var ritmo = formatatempo (SEGUNDOS);</font></font></p> <p> <font><font>if (SEGUNDOS <= 600) {</font></font></p> <p>     </p> <p> <font><font>    . </font><font>document.getElementById ("contador") style.color = "# 2FFF2F";</font></font></p> <p>         </p> <p> <font><font>    document.getElementById ("contador") innerHTML =''.;</font></font></p> <p> </p> <p> <font><font>    setTimeout (function () {</font></font></p> <p> <font><font>        document.getElementById ("contador") innerHTML = ritmo.;</font></font></p> <p> <font><font>    }, 500</font></font></p> <p> <font><font>    );</font></font></p> <p>     </p> <p> <font><font>        if (SEGUNDOS <= 300) {</font></font></p> <p> <font><font>        . </font><font>document.getElementById ("contador") style.color = "# FFFA1A";</font></font></p> <p>             </p> <p> <font><font>        document.getElementById ("contador") innerHTML =''.;</font></font></p> <p>     </p> <p> <font><font>        setTimeout (function () {</font></font></p> <p> <font><font>            document.getElementById ("contador") innerHTML = ritmo.;</font></font></p> <p> <font><font>        }, 500</font></font></p> <p> <font><font>        );    </font></font></p> <p> <font><font>                if (SEGUNDOS <= 150) {</font></font></p> <p> <font><font>            . </font><font>document.getElementById ("contador") style.color = "# FF0F09";</font></font></p> <p>                 </p> <p> <font><font>            document.getElementById ("contador") innerHTML =''.;</font></font></p> <p>         </p> <p> <font><font>            setTimeout (function () {</font></font></p> <p> <font><font>                document.getElementById ("contador") innerHTML = ritmo.;</font></font></p> <p> <font><font>            }, 500</font></font></p> <p> <font><font>            );    </font></font></p> <p> <font><font>            if (SEGUNDOS == 0) {</font></font></p> <p> <font><font>                . </font><font>document.getElementById ("contador") innerHTML = formatatempo (SEGUNDOS);</font></font></p> <p> <font><font>                n ();</font></font></p> <p> <font><font>                stop ();    </font></font></p> <p> <font><font>    }}}</font></font></p> <p> <font><font>} Else {</font></font></p> <p> <font><font>    document.getElementById ("contador") innerHTML = ritmo.;</font></font></p> <p> <font><font>}</font></font></p> <p> <font><font>}</font></font></p> <p> </p> <p> <font><font>Inicia UMA função () {</font></font></p> <p> <font><font>if (SEGUNDOS == 0) {</font></font></p> <p> <font><font>    alert ("Tempo de Apresentação esgotado!");</font></font></p> <p> <font><font>    stop ();</font></font></p> <p> <font><font>}</font></font></p> <p> <font><font>Intervalo = setInterval ("Conta ();", 1000);</font></font></p> <p> <font><font>}</font></font></p> <p> </p> <p> <font><font>função para () {</font></font></p> <p> <font><font>    if (SEGUNDOS == 0) {</font></font></p> <p> <font><font>clearInterval (Intervalo);</font></font></p> <p> <font><font>alert ("Tempo de Apresentação esgotado!")}</font></font></p> <p> <font><font>else {</font></font></p> <p> <font><font>    clearInterval (Intervalo);}</font></font></p> <p> <font><font>}</font></font></p> <p> </p> <p> <font><font>função zera () {</font></font></p> <p> </p> <p> <font><font>clearInterval (Intervalo);</font></font></p> <p> <font><font>SEGUNDOS = 3600;</font></font></p> <p> <font><font>. </font><font>document.getElementById ("contador") innerHTML = formatatempo (SEGUNDOS);</font></font></p> <p> <font><font>. </font><font>document.getElementById ("contador") style.color = "Branco";</font></font></p> <p> </p> <p> <font><font>}</font></font></p> <p> <font><font></ Script></font></font></p> <p> </p> <p> <font><font></ Head></font></font></p> <p> </p> <p> <font><font><onload Corpo = "pisca ();" </font><font>></font></font></p> <p> <font><font><div id="a"> </ div></font></font></p> <p> <font><font><div align="center"> <img id="imagem" src="imagens/3 Oficina Engenharia.png" width="300" height="169" /> </ div></font></font></p> <p> <font><font><div id="a"> </ div></font></font></p> <p> <font><font><div id="botoes" align="center"> </font></font></p> <p> <font><font><table width="100%" border="0" align="center"></font></font></p> <p> <font><font> <tr></font></font></p> <p> <font><font>    <td align="center" height="50px"> <input type="button" value="Parar" onclick="para();"> </font></font></p> <p> <font><font>        <input type="button" value="Iniciar" onclick="inicia();">      </font></font></p> <p> <font><font>        <input type="button" value="Recomeçar" onclick="zera();"> </ td></font></font></p> <p> <font><font>  </ Tr></font></font></p> <p> <font><font>  </ Table> </font></font></p> <p> <font><font></ Div></font></font></p> <p> <font><font><div id="cronometro" align="center"> </font></font></p> <p> <font><font>  <table width="100%" border="0" align="center"></font></font></p> <p> <font><font> <tr></font></font></p> <p> <font><font>    <td align="center" height="360px"> <span id="counter" class="blink"> <- 00:30:00 -> </ span> </ td></font></font></p> <p> <font><font>  </ Tr></font></font></p> <p> <font><font></ Table>            </font></font></p> <p> <font><font></ Div></font></font></p> <p> <font><font></ Div></font></font></p> <p> <font><font></ Body></font></font></p> <p> <font><font></ Html></font></font></p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <h2> <b><font><font>Parte CSS</font></font></b></h2> <p> </p> <p> <font><font>body {</font></font></p> <p> <font><font>    margin: 0px;</font></font></p> <p> <font><font>    border: 0px;</font></font></p> <p> <font><font>    Altura: 100%;</font></font></p> <p> <font><font>    background-size: 100%;</font></font></p> <p> <font><font>    font-size: 110px;</font></font></p> <p> <font><font>    fonte: Arial, Helvetica, sans-serif;</font></font></p> <p> <font><font>    / * Inicio se degradam do Corpo * /</font></font></p> <p> <font><font>    background-color: # 2F2727;</font></font></p> <p> <font><font>    background-image: url (images / radial_bg.png); </font></font></p> <p> <font><font>    background-position: center; </font></font></p> <p> <font><font>    background-repeat: no-repeat; </font></font></p> <p>     </p> <p> <font><font>    / * Safari 4-5, 1-9 Chrome * / / * Localidade: Não E Possível Localidade: Não Especificado hum tamanho de porcentagem? </font><font>Laaaaaame. </font><font>* /</font></font></p> <p> <font><font>    background:-webkit-gradiente (radial, centro, 0, centro, 460, a Partir de (# 1a82f7), Pará (# 2F2727)); </font></font></p> <p>     </p> <p> <font><font>    / * Safari 5.1 +, Chrome 10 + * / </font></font></p> <p> <font><font>    background:-webkit-radial-gradiente (Círculo, # 1a82f7, # 2F2727); </font></font></p> <p>     </p> <p> <font><font>    / * Firefox 3.6 + * / </font></font></p> <p> <font><font>    background:-moz-radial-gradiente (Círculo, # 1a82f7, # 2F2727); </font></font></p> <p>     </p> <p> <font><font>    / * IE 10 * / </font></font></p> <p> <font><font>    Fundo:-ms-radial-gradiente (Círculo, # 1a82f7, # 2F2727); </font></font></p> <p> <font><font>    / * Fim se degradam do Corpo * /}</font></font></p> <p>     </p> <p> <font><font>Corpo, html {</font></font></p> <p> <font><font>    Altura: 100%;</font></font></p> <p> <font><font>    width: 100%;</font></font></p> <p> <font><font>}</font></font></p> <p>     </p> <p> <font><font># Imagem {</font></font></p> <p> <font><font>    width: 100%;</font></font></p> <p> <font><font>    Altura: 30%;</font></font></p> <p> <font><font>    vertical-align: central;</font></font></p> <p> <font><font>    }</font></font></p> <p> </p> <p> </p> <p> <font><font># {Cronometro</font></font></p> <p> <font><font>    width: 100%;</font></font></p> <p> <font><font>    Altura: 50%;</font></font></p> <p> <font><font>    font-size: 250px;</font></font></p> <p> <font><font>    font-family: Arial Black, Gadget, sans-serif;</font></font></p> <p> <font><font>    color: # FFF;</font></font></p> <p> <font><font>    text-decoration: blink;</font></font></p> <p> <font><font>    }</font></font></p> <p>     </p> <p> <font><font># {BOTOES</font></font></p> <p> <font><font>    width: 100%;</font></font></p> <p> <font><font>    font-size: 30px;</font></font></p> <p> <font><font>    font-family: "Arial Black", Gadget, sans-serif;</font></font></p> <p> <font><font>    color: # FFF;</font></font></p> <p> <font><font>    text-decoration: blink;</font></font></p> <p> <font><font>    }</font></font></p> <p>     </p> <p> <font><font># {Logotipo</font></font></p> <p> <font><font>    width: 100%;</font></font></p> <p> <font><font>    height: 70%;</font></font></p> <p> <font><font>    }</font></font></p> <p> <font><font># A {</font></font></p> <p> <font><font>    width: 100%;</font></font></p> <p> <font><font>    height: 2%;</font></font></p> <p> <font><font>    }</font></font></p> <p> <font><font># Contador {text-decoration: blink;} </font></font></p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p>