Afiseaza natura triunghiului:
program triunghi;
var a,b,c:integer;
begin
write(‘a=’);
readln(a);
write(‘b=’);
readln(b);
write(‘c=’);
readln(c);
if (a>0)and(b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a) then
begin
write (‘Triunghi ‘);
if (a=b) and (b=c) then write (‘echilateral’)
else
if (a=b) or (b=c) or (a=c) then write (‘isoscel’)
else
if (sqr(a)=sqr(b)+sqr(c)) or (sqr(b)=sqr(a)+sqr(c)) or (sqr(c)=sqr(a)+sqr(b))
then write (‘dreptunghic’)
else write(‘oarecare’);
end
else write (‘nu este triunghi’);
readln;
end.
Afiseaza tasta apasata:
program afisarea_tastei_apasate;
uses
crt;
var a:string;
begin
writeln(‘Make by D@ny(CJ)!’);
a:=readkey;
writeln(‘Litera,Numarul apasat = ‘,a);
readln;
end.
Daca vrei sa nu iei ban pe un ban sau pe un joc online!
How To: Change Your Ip In Less Then 1 Minute
1. Click on “Start” in the bottom left hand corner of screen
2. Click on “Run”
3. Type in “command” and hit ok
You should now be at an MSDOS prompt screen.
4. Type “ipconfig /release” just like that, and hit “enter”
5. Type “exit” and leave the prompt
6. Right-click on “Network Places” or “My Network Places” on your desktop.
7. Click on “properties”
You should now be on a screen with something titled “Local Area Connection”, or something close to that, and, if you have a network hooked up, all of your other networks.
8. Right click on “Local Area Connection” and click “properties”
9. Double-click on the “Internet Protocol (TCP/IP)” from the list under the “General” tab
10. Click on “Use the following IP address” under the “General” tab
11. Create an IP address (It doesn’t matter what it is. I just type 1 and 2 until i fill the area up).
12. Press “Tab” and it should automatically fill in the “Subnet Mask” section with default numbers.
13. Hit the “Ok” button here
14. Hit the “Ok” button again
You should now be back to the “Local Area Connection” screen.
15. Right-click back on “Local Area Connection” and go to properties again.
16. Go back to the “TCP/IP” settings
17. This time, select “Obtain an IP address automatically”
tongue.gif 18. Hit “Ok”
19. Hit “Ok” again
20. You now have a new IP address
With a little practice, you can easily get this process down to 15 seconds.
P.S:
This only changes your dynamic IP address, not your ISP/IP address. If you plan on hacking a website with this trick be extremely careful, because if they try a little, they can trace it back.
Fara YahooMulti!
Dak vrei sa ai multi messenger fara sa instalezi YahooMulti:
start->run->regedit->current user->software ->yahoo ->pager ->test ->click dr new dword value ->name:plural ->value 10(dak vrei 10 messuri sau mai multe). si apoi deschizi normal yahoo mess de cate ori ai nevoie
Sper sa va fie de ajutor. Bafta
Cum sa faci Mozila sa se miste mai repede!
In locul unde se scrie pagina web scrieti : About:Config si dai enter
cautati network.http.pipelining dati dublu click si setati la true
cautati network.http.proxy.pipeling dati dublu click si setati la true
cautati network.http.pipelining.maxrequest dati dublu click si setati valoarea la 50
acum dati un click dreapta nu conteaza unde si alegeti new -> interger numiti in nglayout.initialpaint.delay cu valoarea de 0 .
Enjoy!
Cum sa ai un Id messenger doar din cifre!!
Intrati pe ( http://mobile.yahoo.com/go/emulator )
http://mobile.yahoo.com/go/emulator
*Trebuie sa aveti Java instalat.
Odata ajunsi acolo, suntem intampinati de intrebarea:
| Citat: |
In urmatorul pas vom da Skip (nu ne intereseaza produsele Yahoo!).
Apasati tasta sageata in stanga, apoi
Va aparea o avertizare, ignorati-o si apasati Yes:
Acum, apasati sageata jos, si scrie-ti-va ID-ul (din numere sau cifre):
Dupa ce am scris ID-ul:
Dupa ce va scrieti parola:
pentru a completa restul datelor.
Apoi:
Scrieti codul de securitate:
Asta e tot!
Programe de calcul matematic si altele:
Calculeaza Ab patrat:
program a_plus_b_patrat;
uses
crt;
var a,b:longint;
abpatrat:longint;
begin
TextColor(red);
TextBackground(white);
writeln(‘make by D@ny(CJ)!’);
write(‘a=’);
readln(a);
TextColor(red);
write(‘b=’);
readln(b);
if a<0 then abpatrat:=(a*a)-2*(a*b)+(b*b)
else abpatrat:=(a*a)+2*(a*b)+(b*b);
writeln(‘ab patrat=’,abpatrat);
readln;
end.
Calculeaza Adunarea,Scaderea,Inmultirea,Inpartirea a doua numere:
program toate_calculele;
uses
crt;
var a,b:integer;
formula,Scadere,adunare,inpartire,inmultire:real;
begin
TextColor(white);
TextBackground(red);
writeln(‘by D@ny(CJ)!’);
write(‘a=’);
readln(a);
write(‘b=’);
readln(b);
Scadere:=a-b;
adunare:=a+b;
inpartire:=a/b;
inmultire:=a*b;
TextColor(green);
writeln(‘Scadere=’,Scadere);
writeln(‘Adunare=’,adunare);
writeln(‘Inpartire=’,inpartire);
writeln(‘Imultire=’,inmultire);
readln;
end.
Calculeaza Aria Triunghiului si a Dreptunghiului:
program aria_triunghiului;
uses
crt;
var BC,AD:integer;
AT:real;
At2:real;
begin
TextColor(green);
TextBackground(Blue);
writeln(‘Make by D@ny(CJ)!’);
write(‘BC=’);
readln(BC);
write(‘AD=’);
readln(AD);
At2:=(BC*BC);
AT:=(BC*AD)/2;
TextColor(red);
writeln(‘ATriunghi=’,AT);
writeln(‘APatrat=’,At2);
readln;
end.
Program care foloseste ”Length” si afiseaza cate caractere are cuvantul scris:
program string;
uses
crt;
var c:string;
b:integer;
begin
TextColor(red);
TextBackground(green);
writeln(‘make by D@ny(CJ)!’);
write(‘Introdu text=’);
readln(c);
c:=c;
b:=length(c);
TextColor(white);
write(‘cuvantul are ‘,b);
write(‘ caractere’);
readln;
end.
Calculeaz Media,Aritmetica,Geometrica,Armonica:
program liber1;
uses
crt;
var a,b:integer;
Ma:real;
Mg:real;
Mp:real;
begin
TextBackground(white);
TextColor(red);
writeln(‘Make by D@ny(CJ)!’);
write(‘a=’);
readln(a);
TextColor(black);
write(‘b=’);
readln(b);
Mg:=sqrt(a*b);
Mp:=(2*a*b)/(a+b);
Ma:=(a+b)/2;
TextColor(green);
writeln(‘Ma=’,Ma);
writeln(‘Mg=’,Mg);
writeln(‘Mp=’,Mp);
readln;
end.
Verifica daca numerele de la 1 la n sunt palindroame:
Palindrom = numar egal cu inversul sau
Ex. 121=121, 123<>321
Program palindrom;
Uses
crt
var n,m,i,x:integer;
begin
writeln(‘make by D@ny(CJ!’);
TextColor(red);
TextBackground(Blue);
write(’n=’); readln(n);
for i:=1 to n do
begin
x:=i; m:=0;
repeat
m:=m*10+x mod 10;
x:=x div 10;
until x=0;
if m=i then write(i,’ ‘);
end;
readln;
end.
Cifra de control a unui numar:
program cifra_control;
uses crt;
var x,n,s:integer;
begin
writeln(‘make by D@ny(CJ!’);
TextColor(red);
TextBackground(Blue);
write(’n=’); readln(n);
while n>9 do
begin
s:=0; x:=n;
while x<>0 do begin
s:=s+x mod 10;
x:=x div 10;
end;
n:=s;
end;
write(’cifra de control: ‘,n);
readln;
end.
Suma cifrelor unui numar:
program suma_cifrelor;
uses
crt;
var n,s,x:integer;
begin
writeln(‘make by D@ny(CJ!’);
TextColor(red);
TextBackground(Blue);
write(’n=’); readln(n);
x:=n;
while n<>0 do
begin
s:=s+n mod 10;
n:=n div 10;
end;
write(’suma cifrelor numarului ‘,x,’ este: ‘,s);
readln;
end.
Cea mai mica valoare:
program cea_mai_mica_valoare;
uses
crt;
var n,min:integer;
begin
writeln(‘make by D@ny(CJ!’);
TextColor(red);
TextBackground(Blue);
write(’n=’); readln(n);
min:=maxint;
while n<>0 do
begin
if n<min then min:=n;
write(’n=’); readln(n);
end;
write(’minimul: ‘,min);
readln;
end.
Cea mai mare valoare:
program cea_mai_mare_valoare;
uses
crt;
var n,max:integer;
begin
writeln(‘make by D@ny(CJ!’);
TextColor(red);
TextBackground(Blue);
write(’n=’); readln(n);
max:=-maxint;
while n<>0 do
begin
if n>max then max:=n;
write(’n=’); readln(n);
end;
write(’maximul: ‘,max);
readln;
end.
Numarul de cifre al unui numar:
program nr_cifre;
uses
crt;
var n,nr:integer;
begin
writeln(‘make by D@ny(CJ)!’);
TextColor(white);
TextBackground(red);
write(’n=’); readln(n);
while n<>0 do
begin
nr:=nr+1;
n:=n div 10;
end;
write(n,’ are ‘,nr,’ cifre’);
readln;
end.
Verifica daca doua cuvinte rimeaza:
program rima;
uses
crt;
var s,t,ss,tt:string;
i,p:integer;
begin
TextColor(Red);
TextBackground(blue);
writeln(‘make by D@ny(CJ)!’);
write(’s=’); readln(s);
write(’t=’); readln(t);
write(’p=’); readln(p);
ss:=”; tt:=”;
for i:=1 to p do
begin
ss:=ss+s[length(s)];
delete(s,length(s),1);
end;
for i:=1 to p do
begin
tt:=tt+length(t);
delete(t,length(t),1);
end;
if ss=tt then write(’Cele doua cuvinte rimeaza’)
else write(’Cele doua cuvinte nu rimeaza’);
readln;
end.
Transformarea literelor mari în litere mici:
program litere_mari_in_litere_mici;
uses
crt;
var s:string;
i:integer;
begin
TextColor(red);
TextBackground(white);
writeln(‘make by D@ny(CJ)!’);
write(’s=’); readln(s);
for i:=1 to length(s) do
if (s[i]>=’A’) and (s[i]<=’Z’) then
s[i]:=char(ord(s[i])+32);
write(s);
readln; end.
Posted in Algoritmi | No Comments »
Pozitiile calului pe tabla de sah
February 11th, 2007
var i,c,x,y:integer;
begin
write(’x=’); readln(x);
write(’y=’); readln(y);
for i:=1 to 8 do
case i of
1:begin if (x-2>0) and (y+1>0) then writeln(’(‘,x-2,’,’,y+1,’)’); end;
2:begin if (x-1>0) and (y+2>0) then writeln(’(‘,x-1,’,’,y+2,’)’); end;
3:begin if (x+1>0) and (y+2>0) then writeln(’(‘,x+1,’,’,y+2,’)’); end;
4:begin if (x+2>0) and (y+1>0) then writeln(’(‘,x+2,’,’,y+1,’)’); end;
5:begin if (x+2>0) and (y-1>0) then writeln(’(‘,x+2,’,’,y-1,’)’); end;
6:begin if (x+1>0) and (y-2>0) then writeln(’(‘,x+1,’,’,y-2,’)’); end;
7:begin if (x-1>0) and (y-2>0) then writeln(’(‘,x-1,’,’,y-2,’)’); end;
8:begin if (x-2>0) and (y-1>0) then writeln(’(‘,x-2,’,’,y-1,’)’); end;
end;
readln;
end.