22. De março de 2009 # include
# include
char dict [] [2] [40] = (
"Olá", "bonjour",
"Ano", "ano",
"Boa", "bon",
"Carro", "voiture",
"Casa", "maison",
"Sim", "oui",
"Amigo", "amigo",
"Estrada", "Rua",
"",""
);
int main (void)
(
int i = 0;
char palavra [80];
printf ( "Digite uma palavra em Inglês para pesquisa for.n");
gets (palavra);
while (strcmp (dict [i] [0 ],""))
(
if (! strcmp (word, dict [i] [0]))
(
printf ( "equivalente francês é:% sn", dict [i] [1]);
break;
)
i + +;
)
if (! strcmp (dict [i] [0], ""))
printf ( "Palavra não found.n");
return 0;
)
Posted in C | No Comments »
22. De março de 2009 Declare Function SystemParametersInfo Lib "User32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam como qualquer, ByVal fuWinIni As Long) As Long
Public Const SPI_SETDESKWALLPAPER = 20
Dim lngSuccess As Long
Dim strBitmapImage As String
strBitmapImage = "h: windowsstraw.bmp"
lngSuccess = SystemParametersInfo (SPI_SETDESKWALLPAPER, 0, strBitmapImage, 0)
Postado em Visual Basic | No Comments »
21. De março de 2009 # include
# include
# define WIN32_LEAN_AND_MEAN
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PStr szCmdLine, int iCmdShow)
(
if (MessageBox (NULL, "Pressione OK para esvaziar a pasta Documentos recentes". "recicladores", MB_YESNO | MB_ICONINFORMATION)! IDYES =)
return FALSE;
SHAddToRecentDocs (SHARD_PATH, NULL);
return FALSE;
)
Posted in C | No Comments »
20. De março de 2009 Coloque uma caixa de combinação em um formulário e digite o seguinte código.
Private Sub Form_Load ()
Dim impressora
Para cada impressora em Impressoras
Combo1.AddItem printer.DeviceName
Próximo
End Sub
Postado em Visual Basic | No Comments »
20. De março de 2009 # include
int main (void)
(
float terra;
float Mercúrio, Vênus, Marte, Júpiter;
float Saturno, Urano, Neptuno, Plutão;
printf ( "Digite a quantidade de anos a Terra convert.n");
scanf ( "% f", & terra);
/ * conversões * /
mercúrio = terra * 365 / 88;
venus = terra * 365 / 225;
mars = terra * 365 / 687;
jupiter = terra / 11,86;
saturn = terra / 29,46;
Urano = terra / 84;
neptune = terra / 164,8;
Plutão = terra / 247,7;
/ * exibir conversões * /
printf ( "Equivalente mercúrio ano é:% fn", mercúrio);
printf ( "Equivalente venus ano é:% fn", Vénus);
printf ( "Equivalente mars ano é:% fn", mars);
printf ( "Equivalente jupiter ano é:% fn", jupiter);
printf ( "Equivalente saturn ano é:% fn", saturn);
printf ( "Equivalente Urano ano é:% fn", Urano);
printf ( "Equivalente neptune ano é:% fn", neptune);
printf ( "Equivalente Plutão ano é:% fn", Pluto);
return 0;
)
Posted in C | No Comments »