joseleonweb

Untitled

Sep 21st, 2019
119
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Un programa que escriu una línia amb 100 caràcters ’−’.
  2. public class Linia {
  3.     public static void main (String[] args) {
  4.         //Inicialitzem un comptador
  5.         int i = 0;
  6.         //Ja hem fet això 100 cops?
  7.         while (i < 100) {
  8.             System.out.print(’−’);
  9.             //Ho hem fet un cop, sumem 1 al comptador
  10.             i = i + 1;
  11.         }
  12.         //Forcem un salt de línia
  13.         System.out.println();
  14.     }
  15. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×