Home
Resources
Latest reviews
Search resources
Forums
New posts
Search forums
Members
Current visitors
New profile posts
Search profile posts
What's new
New posts
New resources
New profile posts
Latest activity
Rules
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Community
Spammm
C++ learning help pls
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="carlborg" data-source="post: 60179" data-attributes="member: 244"><p>hey im doing a school assignment and i would like some help please..</p><p> </p><p>I basically need to write a progam that asks the user to input three non zero integers and determine and print if they could be the sides of a right angled triangle...</p><p> </p><p>This is what i did</p><p></p><p>#include <stdio.h></p><p></p><p>int main(void)</p><p>{</p><p> int Number1 = 0;</p><p> int Number2 = 0;</p><p> int hypotenuse = 0;</p><p></p><p></p><p> while (Number1 <= 0)</p><p> {</p><p> printf("Enter the first non-Zero Integer\n");</p><p> scanf_s("%d", &Number1);</p><p> }</p><p> </p><p></p><p> while (Number2 <= 0)</p><p> {</p><p> printf("Enter the second non-Zero Integer\n");</p><p> scanf_s("%d", &Number2);</p><p> }</p><p> </p><p></p><p> while (hypotenuse <= Number1, Number2) </p><p> {</p><p> printf("Enter the Hypotenuse\n");</p><p> scanf_s("%d", &hypotenuse);</p><p> }</p><p> </p><p>}</p></blockquote><p></p>
[QUOTE="carlborg, post: 60179, member: 244"] hey im doing a school assignment and i would like some help please.. I basically need to write a progam that asks the user to input three non zero integers and determine and print if they could be the sides of a right angled triangle... This is what i did #include <stdio.h> int main(void) { int Number1 = 0; int Number2 = 0; int hypotenuse = 0; while (Number1 <= 0) { printf("Enter the first non-Zero Integer\n"); scanf_s("%d", &Number1); } while (Number2 <= 0) { printf("Enter the second non-Zero Integer\n"); scanf_s("%d", &Number2); } while (hypotenuse <= Number1, Number2) { printf("Enter the Hypotenuse\n"); scanf_s("%d", &hypotenuse); } } [/QUOTE]
Name
Verification
Name a popular topic discussed in the ugbase.eu community
Post reply
Home
Forums
Community
Spammm
C++ learning help pls
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top