SHARE
TWEET

Untitled

a guest Jul 19th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6.  
  7. package javaapplication6;
  8. import java.util.Scanner;
  9. /**
  10.  *
  11.  * @author UpGrade
  12.  */
  13. public class JavaApplication6 {
  14.  
  15.     /**
  16.      * @param args the command line arguments
  17.      */
  18.     public static void main(String[] args) {
  19.         Scanner im = new Scanner (System.in);
  20.        
  21.         int x = 0;
  22.         int a = 1;
  23.         double summ = 0;
  24.         while (a<=10){
  25.          x++;  
  26.          System.out.println("Ведите число");  
  27.          double k = im.nextDouble();
  28.          summ = summ + k;
  29.          a++;
  30.          System.out.println("Сумма " + x + " чисел равна:" + summ);
  31.         }
  32.                
  33.            
  34.                
  35.        
  36.        
  37.                
  38.     }
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top