Free Essay

Determine One

In:

Submitted By chaosheal
Words 317
Pages 2
Check if Vowel 0r not
#include <stdio.h> int main()
{
char ch; printf("Input a character\n"); scanf("%c", &ch); switch(ch) { case 'a': case 'A': case 'e': case 'E': case 'i': case 'I': case 'o': case 'O': case 'u': case 'U': printf("%c is a vowel.\n", ch); break; default: printf("%c is not a vowel.\n", ch); } return 0;
}
Leap Year or Not
#include <stdio.h> int main()
{
int year; printf("Enter a year to check if it is a leap year\n"); scanf("%d", &year); if ( year%400 == 0) printf("%d is a leap year.\n", year); else if ( year%100 == 0) printf("%d is not a leap year.\n", year); else if ( year%4 == 0 ) printf("%d is a leap year.\n", year); else printf("%d is not a leap year.\n", year); return 0;
}

Add Digits

include <stdio.h> int main()
{
int n, t, sum = 0, remainder; printf("Enter an integer\n"); scanf("%d", &n); t = n; while (t != 0) { remainder = t % 10; sum = sum + remainder; t = t / 10; } printf("Sum of digits of %d = %d\n", n, sum); return 0;
}

Greatest Common divisor and Least Common Multiple
#include <stdio.h> int main() { int a, b, x, y, t, gcd, lcm; printf("Enter two integers\n"); scanf("%d%d", &x, &y); a = x; b = y; while (b != 0) { t = b; b = a % b; a = t; } gcd = a; lcm = (x*y)/gcd; printf("Greatest common divisor of %d and %d = %d\n", x, y, gcd); printf("Least common multiple of %d and %d = %d\n", x, y, lcm); return 0;
}

#include <stdio.h> int main()
{
int n, reverse=0, rem; printf("Enter an integer: "); scanf("%d", &n); while(n!=0) { rem=n%10; reverse=reverse*10+rem; n/=10; } printf("Reversed Number = %d",reverse); return 0;
}

Similar Documents

Free Essay

Determining Databases

...Determining Databases and Data Communication Alfredo Rios BIS/320 May 18, 2015 Eileen Buckholtz Determining Databases and Data Communication Tracking equipment and schedules is crucial when overseeing a project such as scenario 1 describes. Hardware like computers, tablets, and Software like Excel, make the job easier to perform. In scenario 2, a company with employees and various forms of needed equipment; an owner or manager has the needed to view options and cost effectiveness to make the right decisions and progress the company in a positive manner. Scenario 1 Excel may be used to track the in the following manner: |Booth Tracking 2015 | | | | | | | | | | | | |Equipment |Arrival-In |Shipper |Cost |Departure-out |Cost | |Booth Tent |Yes |Fed-ex |$50.00 |yes |$50.00 | |Screen |yes |Fed-ex |$20.00 |yes |$20.00 | |Modems |Yes |Fed-ex |$15.00 |yes |$15.00 | |Monitors |Yes |Fed-ex |$30.00 |yes |$30.00 | |Cables |Yes |Fed-ex |$30...

Words: 906 - Pages: 4

Premium Essay

Res 351 Wk 1 Individual

...in Business Research By: Kristen Keck Josephine Martinez February 11, 2013 Res/351 Research, this is an important aspect to any company that is seeking to gain success. Searching for methods that will add value to companies is also considered the business research process. When researching, one must consider what is in the best interest of the company, its employees, and the community. Community Action is a non-profit organization that operates off of federal and state grants only. When researching what types of grants will profit the agency, it requires a serious though process that has to consider how the services will be beneficial to the community. With the economy on the verge of a downward spiral, Community Action has become a very beneficial agency for people with many types of needs. Anyone needing services such as food, prescriptions, housing, transportation, or early childhood education, can benefit from this agency. Researching the types of services that can be helpful for lower income families or families going through hardships is a very important condition of the agency. When researching what types of services will be most beneficial, we have to determine how the services will be used, who will benefit most, what are the requirements, how much grant funding will be made available, and will this service allow the potential to hire new employees. Business research is important when determining what types of services all companies are considering. It...

Words: 366 - Pages: 2

Premium Essay

Ethical

...My personal preferred ethical lens is the rights and responsibility lens. According to the Ethics Game Company, this means that I use my reasoning skills to determine my duties as well as the universal rules that each person should follow. I believe that I was well placed within this lens inventory, as I have been known to try to push my own thoughts and methods onto others. I do not necessarily push that my way is the “correct and only way” to do things, but because I also put a lot of thought into why I do things I definitely push my way as a “pretty good way” and may strongly encourage its use. For me, when a particular problem or just a new job arises that I am unfamiliar with, I tend to spend nearly as much time figuring out how to come to a solution as I do actually solving the problem. I will sit and analyze every possible route and try to see the benefits and consequences of each action. While looking at my options I try to figure out not only what is the best way to do things efficiently but also ethically. My ultimate decision for a course of action comes down to determining what is the best way for me to complete my duties to the best of my ability. In the Army, this lens proves itself quite beneficial but can occasionally have its down sides as well. My meticulousness in all tasks leads me to often excel in my duties as a Soldier. Another strength is that I often do come up with a quality product or course of action for certain tasks that I then share with...

Words: 389 - Pages: 2

Premium Essay

Service Request

...employee benefits. Currently, the system In place separates every entity into its own subcategory. Before dissecting each category it will be evaluated and will be determined if sections need to be kept or eliminated, as well as what individuals actually use the systems. Following an evaluation of the current system and brainstorming of a new one, its highly important to determine how each system is being used, with hands-on discovery. This is the best way to learn how it is currently being done, as well as the best way to determine what needs to be fixed. Determining the system as well as the users that use them is a good foundation into fixing or recreating a new system. During our project scope phase we will be determining our goals for the new system, deliverables, as well as the cost to implement a new system, and the time it will take to get it all done. All of the following tasks will be delivered in a scope statement. The entire point of creating this now information system is to fix or eliminate the one that is currently in use. The problem with the current one is that it is a mixture of many systems and doesn’t allow for one system to be used. Currently, employees are confused with what is where, and why. However, it is important...

Words: 836 - Pages: 4

Free Essay

Aerospace

...a system Directly from the text; System is a composite consist of people, procedures, and facilities and/or hardware working in a given environment to perform specific task. (Stephans, 60) Product is; not so well explained in the text; the hardware can be most easily said to be two things the tools used to produce an item and the item produced itself. This is seen in the text when it both describes a screwdrivers purpose and the output at a facility being a weapon system. 4. List the three general steps involved in initiating the planning and development of a system safety program. Developing the best plan for any organization will start with the most basic of steps: Determine where you want to go. Examine the generic model. Modify it as necessary to meet the needs of your organization. Determine where you are. Compare your existing system safety program with the model and systematically list all differences. Develop a detailed plan to close the gap. Tailor and edit the procedures given here, if necessary, to produce a systematic plan for transforming your present program into the ideal program. (Stephans, 61) 1. What are the three broad categories of system safety tasks? Who is generally responsible for each task? • Hazard identification [identifying]– includes determining what parts of the project constitue a hazard and determininig the location of these hazards. Continues throughout the life cycle but is concentrated in the concept and design phase…(Stephans,...

Words: 466 - Pages: 2

Free Essay

Nothing

...Hey friends, We know there is a lot of excitement in the community surrounding the Lollipop updates for the One, and for good reason. We are just as excited as you are. We never intended to keep you waiting. Unfortunately, we ran into some unexpected roadblocks. First, there was an unforeseen OS signing issue, which has recently been resolved. Our camera module had stability issues on Lollipop, and we had to rebuild it for compatibility. Several other crucial drivers, including our Wi-Fi drivers, also needed to be updated to work flawlessly with the upgrade. Admittedly, it took a little more time than we had planned, but we only release updates that we are proud of; that means refusing to take shortcuts or deliver sub-par experiences. With all of that in mind, here are the official release dates for Android Lollipop on the OnePlus One: CM 12S: The official OTA update for the OnePlus One will be released on or before March 30, 2015 OxygenOS: The official release of our own Lollipop-based ROM will be available for download on or before March 27, 2015 To show you how serious we are about this commitment to our community, we are prepared to put our money where our mouth is. If we miss either one of these deadlines, we will give away five (5) 64GB OnePlus One devices to our fans. Reply to this thread to be eligible. It’s our little way of saying thank you for being patient and for joining us on our journey to create amazing, user-driven experiences. Never...

Words: 265 - Pages: 2

Premium Essay

A Comparison of the Tale of “Aladdin and the Enchanted Lamp” and the Disney Movie Aladdin: a Cultural Study

...A Comparison of the tale of “Aladdin and the Enchanted Lamp” and the Disney Movie Aladdin: A Cultural Study According to N. J. Dawood, the translator of The Thousand and One Nights, “Aladdin has been retold or presented to so many different generations all over the world that it can perhaps be rightly described as the most renowned story invented by man”. Interestingly enough, “Aladdin and the Enchanted Lamp” was not part of the original collection of stories that composed The Arabian Nights. No one knows exactly when a given story is originated, but it is obvious that some stories circulated orally for centuries before they actually were collected or written down. The story of Aladdin appeared for the first time in Antoine Galland’s (1646-1715) translation of the Thousand and One Nights, the first major European version. Before Galland, there was no known Arabic version of Aladdin and his lamp. The first Arabic version showed up after Galland’s version and very well could have been translations of Galland’s French version. One of the more recent and most popular versions of “Aladdin” was an animated feature produced in 1992 by Walt Disney Pictures. Aladdin made over $217 million in revenue in the United States, and over $504 million worldwide. Even though the American film and the medieval Arabian tale share common elements and are both plotted around a young impoverished boy named Aladdin, the moral lessons they offer differ in ways that can be described through the values...

Words: 3922 - Pages: 16

Free Essay

Maanger

...the thieves find him there, and kill him. When his brother does not come back, Ali Baba goes to the cave to look for him, and finds the body, bringing it home. With the help of Morgiana, a clever slave-girl in Kasim's household, they are able to give Kasim a proper burial without arousing any suspicions about his death. The thieves, finding the body gone, realize that somebody else must know their secret, and set out to track him down. The first several times they are foiled by Morgiana, who is now a member of Ali Baba's household, but eventually they are able to ascertain the location of Ali Baba's house. The lead thief pretends to be an oil merchant in need of Ali Baba's hospitality, bringing with him mules loaded with 40 oil jars, one filled with oil, the other 39 with the other thieves. Once Ali Baba is asleep, the thieves plan to kill him. Again, Morgiana discovers and foils the plan, killing the 39 thieves in their oil jars by pouring boiling oil on them. When their leader comes to rouse his men, he discovers that they are dead, and escapes. The lead thief, disguised as a merchant, befriends Ali Baba's nephew (who is now in charge of the late Kasim's business), and is invited to dinner at Ali...

Words: 804 - Pages: 4

Free Essay

400 Blows

...when it comes to stealing. They start to think things through instead of just going at it. The striking thing about that scene is that it shows the children enjoying the scene and having fun, while Antoine and his friend are in the corner plotting with evil thoughts, not enjoying the show. 2) One street scene that I found that interested me was at 24 minutes into the movie, after Antoine had left the carnival. While walking with his friend through the streets, he saw the once beautiful place of what was known as Paris (it’s still beautiful, just not as much as before), as well as his mother, while she was making out with a man who wasn’t her husband. Just this scene alone portrays that in the 1950s, Paris wasn’t the best place to be. Although it was pretty, it was also very busy and crowded on the streets. Anything could happen. 3) One scene I found visually stunning was the carnival scene where he was in the spinning ride. Although I may be wrong, but I feel as if the director included that scene to give an insight of how Antoine’s mind is and he's foreshadowing the rest of the film. The spinning of the ride refers to how Antoine is a confused kid just trying to get through. At one point of the ride, he is completely upside down. That is when his life turns for the worse when he’s sent off to boot camp/military school. The end of the ride is him banging on the door with excitement and walking out with a huge smile on his face. That’s foreshadowing how he escapes the camp...

Words: 927 - Pages: 4

Free Essay

Arabian Nights

...Core Huamnities 201 Arabian Nights Universal Themes Images and Techniques Used Arabian Nights, also known as One Thousand and One Nights is a story which revolves around a Persian king who just married a new bride. However, he discovers that his wife was unfaithful and has her executed. As a result, all the women in the kingdom are declared unfaithful. Shahryar (the king) begins to marry a sequence of virgins from the kingdom and has them executed the next morning. In due course, the vizier, who is entitled with the responsibility of providing the virgins, can no longer find any more virgins in the kingdom other than his daughter Scheherazade. She offers herself to be a bride to the king despite objections from her father. On the night of their consummation Scheherazade starts to tell the king a story but does not get to finish it. The king is therefore forced to delay her execution in order to hear the conclusion. On the next night, she tells the king another story and this turns into a series of stories that go on for one thousand and one nights (Haddawy 16). Universal Theme Immortality The Arabian Nights comprises of a sequence of stories which do not have an ending. The passing on of the tales is universally seen as a means of preservation. Scheherazade used the narration of stories as a way to preserve her life she further interwove the endings of the stories with the beginnings of the new stories thus giving them a sense of infinity. She told the stories night after...

Words: 711 - Pages: 3

Premium Essay

Ray Bradbury's Use Of Literary Devices In The Veldt

...personify this idea. To better understand the close relationship between his characters, also his major ideas or a theme which appears throughout his stories is Bradbury's imagery. One example of literary devices is personification, which gives non-human things human-like qualities. An example of this is  in Bradbury's story The Veldt when Bradbury writes , "Until this day, how well the house had kept its peace. How carefully it had inquired, "who goes there?...

Words: 1014 - Pages: 5

Premium Essay

Who Is Santiago In The Alchemist

...Thummim, which represent yes, or no. The old king explains to Santiago that these stones will help guide him along his journey During this conversation, the king tells Santiago, “when you want something, the entire universe conspires to help you achieve it” (Coelho 22). This idea will follow Santiago on his journey and be his inspiration for carrying on. This idea of following your treasure, whatever it is, can be found in all of our lives. It is the story of us, we are the protagonist of our own journey. When Santiago takes off, he is faced with the decision to sell his sheep (everything he owns) and have 100% faith of the unknown. He is faced with changes and decisions that will ultimately shape his entire life forward, much like every one of us. Much like Santiago, we have to have faith that we will reach that treasure, believing in our own fate. The old king explains to Santiago that if he really wants this, the entire universe will conspire to help you achieve it. The universe wants you to find your treasure, it wants you to be happy, that’s what it feeds off it; which is why it is fighting for you. This relates to our lives when we want something with such a deep desire; when you work towards that desire, do you notice that you start to get lucky? The old king describes that as beginner's luck, “Every search begins with beginner’s luck. And every search ends with the victors being severely tested.” This started to occur during Santiago's journey, the universe started to...

Words: 1192 - Pages: 5

Free Essay

Aladdin and Its Morals

...Aladdin is one of the tales in the book One Thousand and One Arabian Nights. There are several moral lessons in the story. The main moral lesson on Aladdin is that its best to be yourself. Greatness and strength comes from within, not from without. Its not whats on the outside that' count; what is important is what's on the inside. The moral of the original Middle-Eastern tale 'Arabian Nights' is that greatness and strength comes from within, not from without. This is demonstrated by Aladdin's bravery and intelligence despite his humble upbringing. In Disney's animated musical version of the story, the writers updated this theme to a single phrase, calling Aladdin a 'diamond in the rough'. There are many differences between the movie and the original tale of Aladdin, because the filmmakers believed that the original had an inappropriate moral message. And I have to agree with this for at least two reasons. First, Aladdin never tells the princess who he really is; he becomes a prince thanks to the jinni, but he never considers telling his wife about who he was before that. The original story doesn’t even mention this. Lying and pretending to be someone else is, indeed, something that should not be promoted in a children’s movie.Then, in the original story I really couldn’t stand the princess, Badr al-Budur. She is naïve, has no personality and no opinion, she does what she is told to, and never asks questions. She is so easily tricked, that she almost gets Aladdin killed...

Words: 1077 - Pages: 5

Premium Essay

Independent

... Literary elements refers to aspects or characteristics of a whole text. They are not “used,” per se, by authors; we derive what they are from reading the text. Most literary elements can be derived from any and all texts; for example, every story has a theme, every story has a setting, every story has a conflict, every story is written from a particular point-of-view, etc. In order to be discussed legitimately, literary elements must be specifically identified for that text.   Literary techniques refers to any specific, deliberate constructions of language which an author uses to convey meaning. An author’s use of a literary technique usually occurs with a single word or phrase, or a particular group of words or phrases, at one single point in a text. Unlike literary elements, literary techniques are not necessarily present in every text.   Literary terms refers to the words themselves with which we identify and describe literary elements and techniques. They are not found in literature and they are not “used” by authors.     Allegory: Where every aspect of a story is representative, usually symbolic, of something else, usually a larger abstract concept or important historical/geopolitical event.   Lord of the Flies provides a compelling allegory of human nature, illustrating the three sides of the psyche through its sharply-defined main characters.   Antagonist: Counterpart to the main character...

Words: 4700 - Pages: 19

Premium Essay

Plot Analysis

...they have encountered Marilyn Monroe in their favorite bookstore. The significance of Marilyn to the real plot was that she was something that the two girls could bond over. Marilyn was their “thing” and they did not not want anyone else in on it. Scattered along the path of stalking and helping Marilyn, the narrator speaks affectionately about her friend. She comments on her body shape and monkey nimbleness which before seemed like meaningless comments. There were other clues like the use of “enchanted” several times to properly set the mood for the story. The way the plot and ending came together helped understand these clues. The surprise ending in “Three Girls” tied the entire passage together. It helped me understand that the story was one of a first kiss. The flashback transformed from a celebrity encounter to a romantic experience. It was a cute memory but it made sense of the “persevering author and married with kids” line. It revealed that the narrator became a writer and her friend grew up to become married with kids which tells us that the romance did not last. This revelation helped me understand that this memory was that much more special since the relationship did not work out. Overall, the plot of “Three Girls” had twist ending that greatly helped me understand the passage as a...

Words: 322 - Pages: 2