All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.IncWhile.scala Maven / Gradle / Ivy

object IncWhile {
	def main(args: Array[String]):Unit = 
	{
		var i:Int=0
		var limit = 0;

		while(limit <  1000000000)
		{
			i = inc(i)
			limit = limit + 1;
		}

		println(i);
	}

	def inc(i:Int):Int=i+1
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy