Find

Find

Search for over 200,000 study notes and past assignments!

Swap

Swap

Download study resources by swapping your own or buying Exchange Credits.

Study

Study

Study from your library anywhere, anytime.

1 Found helpful 3 Pages Essays / Projects Year: Pre-2021

An integer is said to be a perfect number if all its factors, including 1 (but not the number itself), sum to that number. For example, 6 is a perfect number because 1, 2, and 3 are all the factors of 6 (ignoring the number itself) and 1 + 2 + 3 = 6. Write a function int perfect(int number) that determines if the parameter number is a perfect number. Use this function in a program that calculates and prints all the perfect numbers between 1 and 10000. Print all the factors of each perfect number to confirm that the number is indeed perfect. Use a "twirly" to indicate that your program is happily working away. A "twirly" is the following characters printed over the top of each other in the following order: '|' '/' '-' '\'. This has the effect of producing a spinning wheel - ie a "twirly". Hint: to do this you can use \r (instead of \n) in printf to give a carriage return only (instead of a carriage return linefeed). (Note: this may not work on some systems - you do not have to do it this way.)


This document is 10 Exchange Credits

More about this document:

This document has been hand checked

Every document on Thinkswap has been carefully hand checked to make sure it's correctly described and categorised. No more browsing through piles of irrelevant study resources.

This is an Essay / Project

Essays / Projects are typically greater than 5 pages in length and are assessments that have been previously submitted by a student for academic grading.

What are Exchange Credits?

Exchange Credits represent the worth of each document on Thinkswap. In exchange for uploading documents you will receive Exchange Credits. These credits can then be used to download other documents for free.

Satisfaction Guarantee

We want you to be satisfied with your learning, that’s why all documents on Thinkswap are covered by our Satisfaction Guarantee. If a document is not of an acceptable quality or the document was incorrectly described or categorised, we will provide a full refund of Exchange Credits so that you can get another document. For more information please read Thinkswap's Satisfaction Guarantee.

Academic Integrity
Studying with Academic Integrity

Studying from past student work is an amazing way to learn and research, however you must always act with academic integrity.

This document is the prior work of another student. Thinkswap has partnered with Turnitin to ensure students cannot copy directly from our resources. Understand how to responsibly use this work by visiting ‘Using Thinkswap resources correctly’.

Claim a Bounty

assignment 1 - Page 1
Page 1 /3
Page 1 /3

Similar documents to "assignment 1" avaliable on Thinkswap

Documents similar to "assignment 1" are suggested based on similar topic fingerprints from a variety of other Thinkswap Subjects

Browse UTS Subjects

University

High School