0 Replies - 952 Views - Last Post: 01 December 2009 - 10:20 PM

#1 athlon32  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 117
  • View blog
  • Posts: 363
  • Joined: 20-August 08

Vala - Velocity Formula

Posted 01 December 2009 - 10:20 PM

Description: Simply calculates velocity
using GLib;

public class HelloObject : GLib.Object {
    
	   
	public static int main(string[] args) {

	        var z = new HelloObject();
		z.calculateVelocity(567, 5);
		return 0;
	}
 

	public void calculateVelocity(int distance, int time) {
		int velocity = distance/time;
		stdout.printf("%d", velocity);
		
	}

}


Is This A Good Question/Topic? 0
  • +

Page 1 of 1