Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 21 wrz 2013 · You should declare time,distance and speed in float if you are going to use decimal inputs and if you want to get a decimal output. `#include<stdio.h> int main() { float time, distance, speed; printf("Enter Your distance: \n"); scanf("%.2f\n", &distance); printf("Enter Your speed: \n"); scanf("%.2f\n", &speed); time=distance/speed; printf("time ...

  2. 2 gru 2016 · I want to calculate the distance between two points but I need to do it by using a main function. I am having some difficulties in trying to make sure that my program returns the correct value.

  3. 28 lut 2024 · Program to calculate distance between two points. Last Updated : 28 Feb, 2024. You are given two coordinates (x1, y1) and (x2, y2) of a two-dimensional graph. Find the distance between them. Examples: Input : x1, y1 = (3, 4) x2, y2 = (7, 7) Output : 5. Input : x1, y1 = (3, 4)

  4. 18 paź 2016 · cout << "Point y for the second coordinate: "; cin >> b; cout << endl; cout << endl; answer = distanceBetweenTwoPoints(x, y, a, b); cout << "The answer is " << answer; } double distanceBetweenTwoPoints(double x, double y, double a, double b){. return sqrt(pow(x - a, 2) + pow(y - b, 2));

  5. 28 lut 2024 · The task is to find the Euclidean distance between these two points. Euclidean distance between two points is the length of a straight line drawn between those two given points. Examples: Input: x1, y1 = (3, 4) x2, y2 = (7, 7) Output: 5. Input: x1, y1 = (3, 4) x2, y2 = (4, 3) Output: 1.41421.

  6. 1 lut 2009 · float f = 123.456; int integerPart = (int)f; int decimalPart = ((int)(f*N_DECIMAL_POINTS_PRECISION)%N_DECIMAL_POINTS_PRECISION); You would change how many decimal points you want by changing the N_DECIMAL_POINTS_PRECISION to suit your needs.

  7. 7 lut 2017 · I'm trying to create a function that allows me to get the distance between the object and another point. I'm have trouble with it though any help would be brilliant. Point(void); Point(double anX, double aY); ~Point(); void setPoint(double anX, double aY); double getX(); double getY(); double scaleX(double theX);