• 第四周作业


    
    
    package set;
    
    import java.util.Scanner;
    
    public class NEXT {
    
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
    
         	
    		int b=0;
    	      for (int a=1;a<=100;a++) {
    	        if(a%3==0) {
    	         b+=a;
    	        
    	        }
    	        
    	 }
          System.out.println(b);
    }
    }
    

      

    package set;
    
    import java.util.Scanner;
    
    public class NEXT {
    
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
              int a=1;
              int b=0;
              while(a<=100){
            a++;	  if(a%3==0) {
            	b+=a;
            	
            	}
              }
         	
    	System.out.println(b);
    
    }
    }
    

      

    package set;
    
    import java.util.Scanner;
    
    public class NEXT {
    
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
            int a=1;
            int b=0;
            do  {a++;
            if(a%3==0){
            	b+=a; 
              	}
                  
       
            } while(a<=100); 
            	
            System.out.println(b);
    	}}
    

      

    package set;
    
    import java.util.Scanner;
    
    public class NEXT {
    
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
          Scanner input=new Scanner(System.in);
           int a=0;
      
           while(a<=9) {
        	   if(a==5) {
        		 a++; 
        		 continue;
        	   }
        		   System.out.print(a);
        		   a++;
           }
           
         }
    	}
    

      

    package set;
    
    import java.util.Scanner;
    
    public class SKS {
    
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
    			Scanner input=new Scanner(System.in);
    			int n=input.nextInt();
    			int a=1;
    			for(int b=1;b<=n;b++) {
    				a*=b;
    				
    			}
    			System.out.println(a);
    			
    	}
    
    }
    

      

    package set;
    
    import java.util.Scanner;
    
    public class SKS {
    
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
    		   Scanner input=new Scanner(System.in);
    		   int a =input.nextInt();
    		   if(a<0||a>100){
    			   System.out.println("输入错误");
    		   }
    		   else {
    				   System.out.println(a);
    				   
    			   
    		   }
    		   
    		    
    	}
    
    }
    

      

    package set;
    
    import java.util.Scanner;
    
    public class SKS {
    
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
    		   Scanner input=new Scanner(System.in);
    		    double a =30000;
    		    double c =30000;
    		    
    		    for(int b=1;b<=10;b++) {
    		    	c=a*(1+0.06);
    		        c=c+a;
    		    	
    		    	
    		    }
    		    	
    		  
    		    System.out.println("总收入是"+c);
    		   }
    		   
    		    
    	}
    

      

  • 相关阅读:
    Dialog对话框
    Intent的七大属性
    Activity启动模式
    Android知识体系
    Activity生命周期
    Intent实现页面跳转和传值
    Android超链接
    上传文件
    XMLSAX解析
    XmlPull
  • 原文地址:https://www.cnblogs.com/575757ljp--/p/12598555.html
Copyright © 2020-2023  润新知