Results 1 to 3 of 3

Thread: JAVA

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    rootkit's Avatar
    Join Date: May:2008
    Location:
    Posts: 3,699

    JAVA

    :
    , (integer) , , , 5 0.

    =0 B=25, 5 , =1 4, 4 .
    , ?

    Code:
    import java.util.Scanner;
    
    public class HelloJava {
    	public static void main(String[] args){ 
    	
    		Scanner input=new Scanner(System.in);
    		System.out.print("A: ");
    		int a=input.nextInt();
    		
    		System.out.print("B: ");
    		int b=input.nextInt();
    		
    		int broi=0;
    		
    		for (int j=a;j<b;j++){
    		int c=j%5;
    		boolean d=(c==0);
    			if (d){
    			broi++;
    			}
    		}
    
    		System.out.printf("%d",broi);
    	}	
    }
    /Hidden:
    Gigabyte B150M-D3H; Intel Core i5-6500@3.2GHz;KINGSTON 2x4GB DDR4 2133MHz HyperX FURY;DEEPCOOL DA500-M Modular; GIGABYTE GeForce GTX 970 4GB G1 GAMING OC EDITION; Gigabyte g1 Gaming R9 380 4GB - RIP

  2. #2
    Registered abUser ike's Avatar
    Join Date: Jul:2004
    Location: sofi
    Posts: 4,965
    , 0%5 0.
    Have no fear ike iz here.
    CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color

  3. #3
    rootkit's Avatar
    Join Date: May:2008
    Location:
    Posts: 3,699
    ... , 0 5, .
    Gigabyte B150M-D3H; Intel Core i5-6500@3.2GHz;KINGSTON 2x4GB DDR4 2133MHz HyperX FURY;DEEPCOOL DA500-M Modular; GIGABYTE GeForce GTX 970 4GB G1 GAMING OC EDITION; Gigabyte g1 Gaming R9 380 4GB - RIP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |