Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,848 members, 7,810,270 topics. Date: Saturday, 27 April 2024 at 04:05 AM

I'm Having A Problem With This Qbasic. Who Can Help? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / I'm Having A Problem With This Qbasic. Who Can Help? (1485 Views)

Please Help With This QBASIC Question / Qbasic Programmers SOLVE THIS QUESTIONS / Can Someone Help Me With This Qbasic? (2) (3) (4)

(1) (Reply) (Go Down)

I'm Having A Problem With This Qbasic. Who Can Help? by Vectormike(m): 7:18am On Dec 19, 2016
Write a Qbasic program which reads the radius of a circle centered at the origin. then read in coordinate (x,y) of a point and determine if that point lies within a circle
Re: I'm Having A Problem With This Qbasic. Who Can Help? by fuckpro: 7:28am On Dec 19, 2016
Vectormike:
Write a Qbasic program which reads the radius of a circle centered at the origin. then read in coordinate (x,y) of a point and determine if that point lies within a circle
... What software do u use in running it
Re: I'm Having A Problem With This Qbasic. Who Can Help? by Vectormike(m): 8:31pm On Dec 19, 2016
Qbasic na
Re: I'm Having A Problem With This Qbasic. Who Can Help? by francollimasso: 11:49am On Dec 20, 2016
should I use c# or javascript to solve it, it's been a while in qbasic
Re: I'm Having A Problem With This Qbasic. Who Can Help? by paranorman(m): 7:12pm On Dec 20, 2016
francollimasso:
should I use c# or javascript to solve it, it's been a while in qbasic
Re: I'm Having A Problem With This Qbasic. Who Can Help? by paranorman(m): 7:13pm On Dec 20, 2016
francollimasso:
should I use c# or javascript to solve it, it's been a while in qbasic
please do and post the solution here.
Re: I'm Having A Problem With This Qbasic. Who Can Help? by Vectormike(m): 8:11pm On Dec 20, 2016
francollimasso:
should I use c# or javascript to solve it, it's been a while in qbasic




Yeah
Re: I'm Having A Problem With This Qbasic. Who Can Help? by Jolliano: 1:25pm On Dec 22, 2016
Vectormike:
Write a Qbasic program which reads the radius of a circle centered at the origin. then read in coordinate (x,y) of a point and determine if that point lies within a circle

Do you need a version where the radius of the circle and coordinates of the point are entered by the user?

Or

a version that is graphic and involves diagrams?
Re: I'm Having A Problem With This Qbasic. Who Can Help? by francollimasso: 8:53pm On Dec 22, 2016
paranorman:
please do and post the solution here.
saw your mention late, this is it

using System;

namespace circlegeometry
{
class Program
{
static void Main(string[] args)
{
int r, y, x, d2;
Console.WriteLine("please enter the radius"wink;
r = int.Parse(Console.ReadLine());
Console.WriteLine("please enter the x coordinate"wink;
x = int.Parse(Console.ReadLine());
Console.WriteLine("please enter the y coordinate"wink;
y= int.Parse(Console.ReadLine());

d2 = (x ^ 2) + (y ^ 2);

Console.WriteLine(d2 < (r ^ 2) ? "Lies within the circle" : " lies on or outside the circle"wink;
Console.WriteLine();
}
}
}

1 Like

Re: I'm Having A Problem With This Qbasic. Who Can Help? by francollimasso: 8:55pm On Dec 22, 2016
Vectormike:





Yeah

nairaland has introduced emoticon to my code, who send nairaland
Re: I'm Having A Problem With This Qbasic. Who Can Help? by Vectormike(m): 5:07pm On Dec 23, 2016
Jolliano:


Do you need a version where the radius of the circle and coordinates of the point are entered by the user?

Or

a version that is graphic and involves diagrams?



The user enters the radius
Re: I'm Having A Problem With This Qbasic. Who Can Help? by Vectormike(m): 5:08pm On Dec 23, 2016
francollimasso:

nairaland has introduced emoticon to my code, who send nairaland



Thanks so much. lol. I still got it.
Re: I'm Having A Problem With This Qbasic. Who Can Help? by Jolliano: 7:49am On Dec 26, 2016
Vectormike:




The user enters the radius

PRINT "Welcome"

INPUT "Enter the radius of the circle"; r

INPUT "The X-cordinate of the point"; x
INPUT "The Y-cordinate of the point"; y

L = (x ^ 2) + (y ^ 2) - (r ^ 2)

IF (L > 0) THEN PRINT "This point lies outside the circle." ELSE PRINT "The point lies inside the circle"

(1) (Reply)

Web Job For Professional Developer / What Does 1 Million Factorial Look Like? / Guys You Need To See This...sooo Funy (pics)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.