Jump to content
xisto Community

Dark_Prisoner

Members
  • Content Count

    23
  • Joined

  • Last visited

Posts posted by Dark_Prisoner


  1. Good work for a beginner :P
    Any way you was able to put each procedures running in 2 if() conditions having the same condition int the same if()
    *And there is a word replacing "\n" in the C++ language which is : endl = End line . I think it is easier to be read .
    *Why don't you replace :

    cin.get();

    by
    system("PAUSE");
    which shows you a beautiful line in the console

    ("Press any key to continue")

    *Always return a 0 status from you program , in fact i always use :
    return EXIT_SUCCESS
    which means that the program encountered no problem .
    ->After modifications you code will be like this : (Your actual code is correct but it will be more ... Professional ? )

    #include   using namespace std;   int main()  {  [indent]// Define variables int anumber;  cout<<"Please enter a number between 1 and 10"; cin>> anumber; cout<  if (anumber > 10) {  [indent]cout<<"Number above 10!"; cout<<< endl;  cout<<"Decreasing number entered to 10...."; cout<<< endl;  for (int a = anumber; a >= 10; a--)  {  [indent]cout<< a <<endl; [/indent] }  [/indent]}  else if (anumber < 1)  {  [indent]cout<<"Number below 1!"; cout<<< endl;  cout<<"Increasing number entered to 1...."; cout<<< endl;  for (int b = anumber; b <= 1; b++)  { [indent]cout<< b <<endl; [/indent]}  [/indent]}  else  {  [indent]cout<<"You entered "<< anumber <<" which is between 1 and 10"; cout<<< endl; [/indent]} cout<<< endl;  system("PAUSE"); return EXIT_SUCCESS; [/indent]}
    Now what do you think ?

    Notice from rvalkass:

    Your code needs to have Code tags around it. Added them.


  2. how does that :

    #include <stdio.h>main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a)&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/"):t<-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\+1 ):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc \i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}
    Shows that : ?
    Console :On the first day of Christmas my true love gave to mea partridge in a pear tree.On the second day of Christmas my true love gave to metwo turtle dovesand a partridge in a pear tree.On the third day of Christmas my true love gave to methree french hens, two turtle dovesand a partridge in a pear tree.On the fourth day of Christmas my true love gave to mefour calling birds, three french hens, two turtle dovesand a partridge in a pear tree.On the fifth day of Christmas my true love gave to mefive gold rings;four calling birds, three french hens, two turtle dovesand a partridge in a pear tree.On the sixth day of Christmas my true love gave to mesix geese a-laying, five gold rings;four calling birds, three french hens, two turtle dovesand a partridge in a pear tree.On the seventh day of Christmas my true love gave to meseven swans a-swimming,six geese a-laying, five gold rings;four calling birds, three french hens, two turtle dovesand a partridge in a pear tree.On the eighth day of Christmas my true love gave to meeight maids a-milking, seven swans a-swimming,six geese a-laying, five gold rings;four calling birds, three french hens, two turtle dovesand a partridge in a pear tree.On the ninth day of Christmas my true love gave to menine ladies dancing, eight maids a-milking, seven swans a-swimming,six geese a-laying, five gold rings;four calling birds, three french hens, two turtle dovesand a partridge in a pear tree.On the tenth day of Christmas my true love gave to meten lords a-leaping,nine ladies dancing, eight maids a-milking, seven swans a-swimming,six geese a-laying, five gold rings;four calling birds, three french hens, two turtle dovesand a partridge in a pear tree.On the eleventh day of Christmas my true love gave to meeleven pipers piping, ten lords a-leaping,nine ladies dancing, eight maids a-milking, seven swans a-swimming,six geese a-laying, five gold rings;four calling birds, three french hens, two turtle dovesand a partridge in a pear tree.On the twelfth day of Christmas my true love gave to metwelve drummers drumming, eleven pipers piping, ten lords a-leaping,nine ladies dancing, eight maids a-milking, seven swans a-swimming,six geese a-laying, five gold rings;four calling birds, three french hens, two turtle dovesand a partridge in a pear tree.

    Can you please explain it ?

  3. This is small program that generates a random number and asks you for it
    If you guess it than it is right
    If you don't it will tell you if it is more or less


    It is in french but i think you'll understand the idea (may be i'll make another edition in english !)

    /////////////////////////////////////////////////////////////////////////////////				   Excellence micro systemsŽ 2007Š						 ////																		   ////   We are glad to present for you our "Plus ou moin v2.0" it is a little   ////game running under a console for example ms-dos or Konsole ... The "Plus ou////moin v1.1.exe" file runs under MS-dos and Windows console.. With the source////code you can compile the application and make it work with any OS such as  ////Windows , Linux , mac OS ... To see what's new on that version pleaze run  ////the file named "what's new.txt" ....	Now we wish for you a funy time;) ////																		   //// To contact us please send a mail to Mr Dhia Eddine Chouchane			  ////"assir2@hotmail.fr"														////Or take a look at our main site : "http://excellence.247ihost.com"		 /////////////////////////////////////////////////////////////////////////////////#include <stdio.h>#include <stdlib.h>#include <time.h> //librairie qui permet de tirer un nombre au hazardint main(int argc, char *argv[]){	//Tout d'abord défénir les variables de l'environnement	long nombreDevined = 0 , nombreMystere = 0 , nombreDeCoups = 0 , choix;	int MAX = 100 , MIN = 1 , Jeu = 1;	 //L'intro!	printf("Excellence micro systems presente :\n\nLe jeu de plus ou moin ...");	printf(" \n\n\n\n\n\n\n");	 //Puis definir la fonction de choix aleatoire	srand(time(NULL));	 //Apres on commence dans le programme	 //On demande le choix de l'utilisateur	printf("Que voulez vous faire?\n");	printf("\n1. Jouer\n");	printf("2. Quitter l'application\n");	printf("\n== Entrez le Numero de votre choix et puis ENTRER\n");	printf("\n\n\n\n\n\nREMARQUE : Pour quitter durant le jeu appuyer sur 0 puis sur ENTRER\n\n");	scanf("%ld", &choix);	switch (choix)	{		  case 1 :;		  break;		  case 2 :			   printf("Tu vas quitter le jeu !!\n\n\n");			   Jeu = 0;		  break;		  default : printf("Ton choix ne figure pas dans la liste\n");		  break;		  }	// On entre dans une boucle pour pouvoir rejouer afin d'accomplir le jeu	while (Jeu)	{		//Le programme charge un nombre au hasard		nombreMystere = (rand() % (MAX - MIN + 1)) + MIN;		   /* On redefinie nombreDevined en 0 pour que ça ne pe jamais etre égal		   avec nombreMystere*/		   nombreDevined = 0;		   while (nombreDevined != nombreMystere)		   {				 //On demande le nombre				 printf("Quel est le nombre ?");				 scanf("%ld", &nombreDevined);				 nombreDeCoups++;				 //Puis on fait l'analyse				 if (nombreDevined == nombreMystere)				 {					   printf("Bravo, vous avez trouve le nombre mystere en %ld essais!!!\n\n" , nombreDeCoups);					   //On demande de l'utilisateur si il veux rejouer					   printf("Voulez vous jouer une deuxieme fois?\n");					   printf("si oui tapez 1 puis ENTRER\n");					   printf("si non tapez 2 puis ENTRER\n");					   scanf("%ld", &choix);					   switch (choix)					   {							case 1 : Jeu = 1;							break;							case 2 : Jeu = 0;							break;							default : printf("Ton choix ne figure pas dans la liste\n");									  printf("Tu vas quitter le jeu\n");									  break;							}					   }				 //N'oublions pas que nous sommes toujours en analyse				 if (nombreDevined == 0)				 {					   printf("\n\nTus va quitter le jeu\n\n\n");					   Jeu = 0;					   nombreDevined = nombreMystere;					   }				  else if (nombreDevined > nombreMystere)				  {					  printf("C'est moins !\n\n");					  }				  else if (nombreDevined < nombreMystere)				  {					  printf("C'est plus !\n\n");					  }				  else printf("Ce que tu a entre est faux ou tu a choisis de quitter l'application\n\n");				  }		 }  /*demander de l'utilisateur de taper une touche pour continuer afin qu'il  peut voir ce qui c'est écrit*/  system("PAUSE");  return 0;}//////////////////////////////////////////////////////////////////////////////////		 All rights reserved to Excellence micro systemsŽ 18/08/2007Š	   ////			  and to its owner Mr. Dhia Eddine Chouchane					//////////////////////////////////////////////////////////////////////////////////

    Now how about some optimizations ?

  4. Which do you think is better XP or Vista or Linux. I am constantly switching back and fourth and cant stick with either. vist has some pretty cool features but Xp has about twice the amount of performance.

    If you want my advice , here is a comparation :

    *-* Linux is the most secure system , it is also : open-source witch means that it is free and its source code is available .
    It is also updated every 2months (depends on your edition )
    It had many desktop environments , a lot of them are amazing . and if you are a good programmer you can make your own desktop environment.
    90% of the programs working on it are open-source too
    There are some programs that let you open windows programs on it , I am thinking about :
    -Wine : present in about all the editions
    -Play on linux : http://forums.xisto.com/no_longer_exists/

    *-*Windows Xp professional
    I advise you to use it if you are not a linux pro or you don't want to leave windows
    It can be safe 50% with a good antivirus.
    It is not free you should have a liscence for it.

    *-*Windows Vista :
    Good only on the graphics and the transparent windows
    Security is not clear.
    It has many problems with the explorer.exe (trust me i close it and re run it about 10 times a day )
    All your programs must be up to date to work on it , and some times they doesn't work even if they're updated !

    Finally i think that you should get :
    1- If you understand it : Linux
    2- Win Xp Pro as an alternative system to linux

    I hope that was the answer to your question

  5. #include <stdio.h>void fun(void){#define fun() i=10}int main(){int i = 20;fun();printf("i = %d\n", i);return 0;}
    I think that this won't work :
    (i guess) we can't put preprocessor directives on a function
    If we can , it won't work also , because the compiler or the processor had completed the line :
    fun();
    so he won't replace it .

    if the preprocessor works in functions i guess this will be the answer
    void fun(void){#define printf("i = %d\n", i) i=0}int main(){int i = 20;fun();printf("i = %d\n", i);return 0;}

    What do you think ???

  6. where did you get the info that arafat was poisoned?? that's a joke and a half. LOL, the guy was 75 years old!! If Isreal wanted to assassinate him, why wait till now when he already had one foot in the grave? it is so absurd that anyone would try to perpetuate such a stupid rumor
    Jews are not the only ones killing people.. have you ever heard of suicide bombers? you might say they are in retaliation but you have NO IDEA who is retaliating and who is initaiting.. it can be argued both ways...



    Well the medical report said that he was poisoned .

    And take a look please at the statistics ... Who is killing more ? Palestenians with their small rocks , or Isrealis with their Guns and their Tanks and their bombs And their aerofighters?
    Every day :
    * 3-6 Palestinians die
    which are about 70% *women and children*
    * 5-9 Palestinians lose their home and become homeless

    * about 3 *Soldiers*

    Do you think that these peoples are not going to revenge ? They invented the "suicide bombers" way to defend their selves and their sons , wives , etc..
    And finally who came first ? Israelis or Palestinians .. The land was owned by palestinians but Israelis came to it by war .. and now they want us to believe that they're doing that for peace , and to defend their selves .

    who says Israel wants to make peace?? they are the one who made the trouble, conquering the Palestinian land, & killing thousands of innocent people. The poor Palestinians try to defend their homes & families.
    Palestinians friends around the world also trying to stop the Israelian cruelty. That's why there were suicide bombers & thats' the only way to teach Israels supporters.


    I completely agree with you

  7. Hi every body . I am "Dark Prisoner" known also as "Assir2" (well this is not my real name , but it is a good nickname i guess :P )However i am from Tunisia , a country on the mideterranean - african coasts , where life is wonderful because of peaceI study on the second class at a Pioneer High school called "Monastir Model High School , LPM" and I am 15 years old.I love computer science , so i think i will study in the computer sciences section. ; I am a programmer using C/C++ Language , a xHTML/PHP coder , Code::Blocks user and GNU/Linux loverI like "heavy metal / symphonic rock / gothic rock " types of music .. I prefere (Metallica , System Of A Down , Rammstein , The cranberries , and Linkin Park a little bit)I hope that you greet me warm in this forum !


  8. I guess he forgot. But here's some Pro's and Con's for Linux you could use:

     

    Pro's:

    Most distributions are free (Open-source).

    Good for servers.

    Some distributions have good user support.

    Some distributions allow you to test before installing (LiveCD).

    Con's:

    Some distributions require some knowledge of how Linux works to get the most out of that distribution.

    Not many companies make programs for Linux.

    Meh, i haven't used Linux, besides a LiveCD. But that's what i can think of off the top of my head.
    You forgot :

    Pros :

    All the world is developping open-source programs for it , (you can find anything you want but not made by a big company ; and it works fine )


  9. O.K. I found this software called opera mobile. I downloaded the trial version onto my phone and started using it. (I was using internet explorer on my phone). It seemed ok but it went way slower than internet explorer. And I started wondering why they even charge money for something thats worse than a free software. So I started thinking maybe I set it up wrong. Has anyone else used it?
    btw, here is a quote about the software:

    "Opera Mobile is a Web browser from Opera Software designed for personal digital assistants (PDAs) and smartphones based on the Windows Mobile and S60 platforms. It can come pre-installed on such devices or purchased by the end-user. Series 90 platform phone from Nokia such as the 7710 has Opera browser pre-installed. It also comes pre installed on some non Windows Mobile or Nokia handsets, like the Motorola V9 RAZR on ATT.

    Opera Mobile can dynamically reformat Web pages for narrow tall screens, using Opera's Small Screen Rendering (SSR) technology. The technology itself is proprietary, but Web page authors can affect how their content is handled by SSR with Cascading Style Sheets.

    Opera has announced the next version of its software, Opera Mobile 9, will support Ajax, widgets and offer a more intelligent zoom feature.

    A more limited version of the same technology is available for free in the Opera Mini line."


    I used it on my phone running under Symbian OS (Nokia Series 60S) and it is working fine , and free . It is better than the standard symbian browser because it displays an entire web page written in HTML with no modifications (we should say a little bit modified to be adapted with the screen) .

    May be your Opera is not going well because you are using a "Windows Mobile " Operating system , Well i don't and i won't ; I will never use a Microsoft product , even on my phone.

    Notice : Opera is free ! recheck it on the official webpage ... And reinstall it , may be it we'll repare the problem

  10. Well sometimes the code is well written but when the navigator download it's source linbreaks disappears and it become impossible to read , that happened with me Any way it is really important to be organized when coding , because as you said , sometimes we can't understand what we made by our selves


  11. Introduction to programmation

     

    I heard so many people talking about programmation but I dont know exactly what it does mean!.

     

    Well it's true that when we hear somebody talking about programmation, we feel that he is speaking in a foreign language .. But know you will understand him at least a little bit :P . You must know that programmation is making programs. "A program" means any thing could be executed in a machine, it could be software or hardware (a software program is a program that runs in a computer and have effect with the user) and (a hardware program is a program that runs in the machine micro-ships and circuits).In our case , We will programm software programs. To achieve that we need a programmation language.

     

    Euh , What's a programmation language?

     

    A programmation language is the language that we use to make the programs. The one that the compiler understand. A program is not made by some simple clicks by your mouse!

    There are many programmation language such as : C/C++

    Visual Basic

    Python

    Java

    ..

    And we class them by level "height", for example "Assembler" is a very low level language. In the opposite way "Java" is a high level one.

     

    Why do we class them this way?

     

    We class programmation languages because every height of level has its appropriate caracteristics. We must retain: A low level language is very fast and it doesn't require a lot of the system power, but in fact a simple program in a low level language require much of code lines , a very big number!

    Opposite sens , the high level languages are very easy to be manupilated by the programmer but it requires a lot of the machin power!.

     

    Ok , but are we going to use all these languages? and wich level are we going to program on?

     

    Of course we are not going to use all the programmation languages! The language that we're gonna use is the C language, and let me introduce it in few lines (a general culture have never killed any one;): The first language made was "Assembler" it was very hard. And it spoke directly to the the micro-processor of the computer. So it was more a machine language then a Human language.This is why they invented language "A" wich didn't stay long so the "B" language came and relaced it. The "B" language didn't disappear but programmer's developped it to become "C" language and we will learn it now. It is a "portable" language ( that doesn't mean that it works in the mobile phone :P ). Protable means that the same source code can work on any Operating system , such as :Windows, Linux, Mac, symbian ( so it work also on phones lol ). The C language isn't a low level nor a high level language but we can say that it is in the middle of the stears :P .

     

    The Assembler didn't disappear ! It still be used in many programs especially in high damage viruses because it's the closest to the machine and it moves directly the values of the micro-processor registery's.

    This doesn't help by nothing now but it is just a general culture !

     

    Excuse me , What can you're language do ?

     

    It can do what you want it to do ! It can make 3Dimensional games , Text editors, Mp3 player , .. Any thing .

    For your information half life 2 was made by the C++ language wich is a new "version" of the C language and this doesn't mean that C is limited .

    Remember one thing THERE ARE NO LIMITS !

     

    All right now ,it is enough for today .. You have a little knowledge about programmation and the programmation languages .. In the next chapter we'll configure our machines and move into the battle field !

    //Please comment this tutorial


  12. Why are we Born in this Earth? Why are we created in this earth? Why are we different from other animals/creatures? Why are we marrying and have children?I think there is an answer for all these questions. If you have brain with 6 senses and time to think, answer these questions..


    Well as i believe , we are born to be tested another day , to see who done good and who done bad things;
    The place (earth ) has a divin answer ;
    We are different from animals and creatures because we have brain to think and protect our selves with it, and to answer questions of existing the source , and the future;

    This is my opinion , And You have to think and find a good answer
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.