Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > General Discussions > Fun
Register

Reply
 
LinkBack Thread Tools
Old 14.10.2005, 14:57   #1
★★★★★★★★★★★★★
 
Hrach_Techie's Avatar
 
Join Date: 08 2004
Location: London, UK
Age: 38
Posts: 16,531
Downloads: 8
Uploads: 0
Reputation: 482 | 6
Talking Гимн Сов. союза на С++

Code:
#include <dos.h> 
#include <conio.h> 
#include <iostream.h> 

const do1 = 130.0, 
re = 146.8, 
mi = 164.8, 
fa = 174.6, 
sol = 196.0, 
la = 220.0, 
si =246.9, 
do2 = 261.7, 
re2 = 293.7, 
mi2 = 329.6, 
speed = 50, 
k = 20; 

void nota(unsigned n, unsigned d){ 
sound(n); 
delay(d); 
nosound(); 
delay(speed); 
} 

void main(){ 
textbackground(RED); 
clrscr(); 
for(int i = 1; i<=10; i++) // znaju chto takoj sposob prosto erunda 
cout << endl; // no vkljuchat graph rejim eshe erundovee. 
cprintf(" So"); // a kak eshe mozhno? a to ja v C++ plokho rublju. 
nota(sol,10000/k); 
cprintf("uz"); 
nota(do2,30000/k); 
cprintf(" ne"); 
nota(sol,20000/k); 
cprintf("ru"); 
nota(la,10000/k); 
cprintf("shi"); 
nota(si,30000/k); 
cprintf("myj"); 
nota(mi,20000/k); 
cprintf(" res"); 
nota(mi,10000/k); 
cprintf("pub"); 
nota(la,30000/k); 
cprintf("lik"); 
nota(sol,20000/k); 
cprintf(" svo"); 
nota(fa,10000/k); 
cprintf("bod"); 
nota(sol,30000/k); 
cprintf("nykhn"); 
nota(do1,20000/k); 
delay(100); 
cprintf(" Na"); 
nota(do1,10000/k); 
cprintf("ve"); 
nota(re,20000/k); 
cprintf("ki"); 
nota(re,10000/k); 
cprintf(" splo"); 
nota(mi,10000/k); 
cprintf("ti"); 
nota(fa,20000/k); 
cprintf("la"); 
nota(fa,10000/k); 
cprintf(" ve"); 
nota(sol,10000/k); 
cprintf("li"); 
nota(la,20000/k); 
cprintf("ka"); 
nota(si,10000/k); 
cprintf("ja"); 
nota(do2,10000/k); 
cprintf(" rus..."); 
nota(re2,40000/k); // mozhno by i dalshe ,no nadoelo uzh  
getch(); 
}
http://www.vr-online.ru/printer.php?...ew&id=6&page=1
Reply With Quote
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 05:35.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.