GithubHelp home page GithubHelp logo

php-exercises-loop's Introduction

#PHP - Les boucles ##Exercice 1 Créer une variable et l'initialiser à 0.
Tant que cette variable n'atteint pas 10, il faut :

  • l'afficher
  • l'incrementer

##Exercice 2 Créer deux variables. Initialiser la première à 0 et la deuxième avec un nombre compris en 1 et 100.
Tant que la première variable n'est pas supérieur à 20 :

  • multiplier la première variable avec la deuxième
  • afficher le résultat
  • incrementer la première variable

##Exercice 3 Créer deux variables. Initialiser la première à 100 et la deuxième avec un nombre compris en 1 et 100.
Tant que la première variable n'est pas inférieur ou égale à 10 :

  • multiplier la première variable avec la deuxième
  • afficher le résultat
  • décrémenter la première variable

##Exercice 4 Créer une variable et l'initialiser à 1.
Tant que cette variable n'atteint pas 10, il faut :

  • l'afficher
  • l'incrementer de la moitié de sa valeur

##Exercice 5 En allant de 1 à 15 avec un pas de 1, afficher le message On y arrive presque.

##Exercice 6 En allant de 20 à 0 avec un pas de 1, afficher le message C'est presque bon.

##Exercice 7 En allant de 1 à 100 avec un pas de 15, afficher le message On tient le bon bout.

##Exercice 8 En allant de 200 à 0 avec un pas de 12, afficher le message Enfin !!!!.

php-exercises-loop's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.