Here is the Interesting C++ Program to Print his/her name or any other
statement Which You Want to Print. so Now , I m going to print my
name DEEPAK .
Complied On :- Code::Blocks 10.05
Save as :- .cpp file (C++ program)
Header File :- <iostream> and <windows.h>
Pre-Defined Function :- Beep Function
Beep Function :- Syntax :- Beep(Frequency , Duration) Frequency :- (Optional) Frequency of the beep in Hz.. (From 37 through 32,767) Default is 500 Hz. Duration :- (Optional) Duration of the beep in ms(milliseconds). Default = 1000 ms. Example :- Beep(1000,2000) Play a beep noise , at 1000Hz for 2 seconds |
so , here is the source code for printing DEEPAK using Beep Function in
Windows.h header file .
#include <iostream> #include <windows.h> using namespace std; void name (char g, float l) { Beep(1000,l*1000); cout <<g; } int main() { int i; cout<<"\n\n\t\t"; for(i=1;i<=52;i++) name('*', 0.2); cout<<"\n\n\t\t"; //DEEPAK name('D', 0.2);name('D', 0.2);name('D', 0.2);name('D', 0.2);name('D', 0.2);name('D', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2); name(' ', 0.2);name(' ', 0.2); name('P', 0.2);name('P', 0.2);name('P', 0.2);name('P', 0.2);name('P', 0.2);name('P', 0.2);name('P', 0.2); name(' ', 0.2);name(' ', 0.2); name('A', 0.2);name('A', 0.2);name('A', 0.2);name('A', 0.2);name('A', 0.2);name('A', 0.2);name('A', 0.2); name(' ', 0.2);name(' ', 0.2); name('K', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('K', 0.2); cout<<"\n\t\t"; name('D', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('D', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('P', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('P', 0.2); name(' ', 0.2);name(' ', 0.2); name('A', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('A', 0.2); name(' ', 0.2);name(' ', 0.2); name('K', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('K', 0.2);name(' ', 0.2);name(' ', 0.2); cout<<"\n\t\t"; name('D', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('D', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('P', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('P', 0.2); name(' ', 0.2);name(' ', 0.2); name('A', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('A', 0.2); name(' ', 0.2);name(' ', 0.2); name('K', 0.2);name(' ', 0.2);name('K', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); cout<<"\n\t\t"; name('D', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('D', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2); name(' ', 0.2);name(' ', 0.2); name('P', 0.2);name('P', 0.2);name('P', 0.2);name('P', 0.2);name('P', 0.2);name('P', 0.2);name('P', 0.2); name(' ', 0.2);name(' ', 0.2); name('A', 0.2);name('A', 0.2);name('A', 0.2);name('A', 0.2);name('A', 0.2);name('A', 0.2);name('A', 0.2); name(' ', 0.2);name(' ', 0.2); name('K', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); cout<<"\n\t\t"; name('D', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('D', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('P', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('A', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('A', 0.2); name(' ', 0.2);name(' ', 0.2); name('K', 0.2);name(' ', 0.2);name('K', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); cout<<"\n\t\t"; name('D', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('D', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('P', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('A', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('A', 0.2); name(' ', 0.2);name(' ', 0.2); name('K', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('K', 0.2);name(' ', 0.2);name(' ', 0.2); cout<<"\n\t\t"; name('D', 0.2);name('D', 0.2);name('D', 0.2);name('D', 0.2);name('D', 0.2);name('D', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2); name(' ', 0.2);name(' ', 0.2); name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2);name('E', 0.2); name(' ', 0.2);name(' ', 0.2); name('P', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2); name(' ', 0.2);name(' ', 0.2); name('A', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('A', 0.2); name(' ', 0.2);name(' ', 0.2); name('K', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name(' ', 0.2);name('K', 0.2); cout<<"\n\n\n\t\t"; for(i=1;i<=52;i++) name('*', 0.2); return 0; } |
Thank You To All My Reader
Related Post
1. JavaScript Basic Part-1
2. Animated moving car program : computer graphics in c
1. JavaScript Basic Part-1
2. Animated moving car program : computer graphics in c
5. JDK 8
Really cool program...
ReplyDeleteDEEPAK....
nice way to print name or any other statement..
10nx 4 sharing..:):)
Deepak....
ReplyDeletecool way to print..:):)
Welcome..
ReplyDeleteStay Tuned for more Updates..:):)