Premium Essay

Cmis

In:

Submitted By patelsaagar
Words 316
Pages 2
CMIS 102 Hands-On Lab
Week 1:
Overview:
This Hands-on lab allows you to experiment with simple sequential print statements using an online C compiler such as ideone.com or codetwist.com
Instructions:
a. Open up any online C compiler (e.g ideone.com, codetwist.com). b. Be sure the C Language is selected. c. Enter the code below into the editor. (Note: LEO doesn’t let you just copy and paste from this document so you can either download the document and then copy and paste or just go to the Code for HelloWorld link for this week and copy and paste from there.) d. Click the submit, or run button. e. Try the additional learning exercises on the next page.
Here is what Hello, World! Looks like using ideone.com after it has successfully run

Hello, World C code #include <stdio.h> int main(void) { printf("Hello, World!"); return 0; }

Learning Exercises for you to try:

1. Remove the semi-colon (;) at the end of this statement:

printf("Hello, World!");

main.c: In function ‘main’: main.c:5:4: error: expected ‘;’ before ‘return’ return 0; ^

2. What happens if you add another printf statement such as:

printf("Goodbye"); after the printf("Hello, World!"); line?

Hello, World!Goodbye

The Lack of a \n which means new line made the two phrases sit side by side with no spaces in-between.

3. Experiment by adding additional printf statements to your code such as: printf("Goodbye \n"); printf("Hello, again! \n");
What does the "\n" do to the output?
The \n signifies a new line, so when I put the code below in, it allowed for spaces to appear after each phrase. Which yielded the results below…
#include <stdio.h> int main(void) { printf("Hello, World! \n"); printf("Goodbye

Similar Documents

Premium Essay

Cmis

...Project 3- Research Paper Tehira K. Wright Instructor: Veena Radhakrishnan Digital Media and Society CMST 301-6382 October 6, 2013 Outline Social media apps and websites have opened the door for consumer driven news and content, as well as online streaming of almost anything. Partnered with smart phones and mobile devices, it comes as no surprise that more media is consumed via Smartphone, tablet or computer than any other way. “Digital media consumption leads the race with people using some sort of mobile or computer device 40% of the time, and television trails at a close second 38% of the time. That leaves radio and print media at 17%. Consumers spend a minimum of 2 hours every day watching videos and monitoring or engaging with social media. The bottom line—most of us spend about 12 hours every day consuming some form of media (Lewis)”. That’s a lot! Digital media is as common in our lives as the food in our refrigerators. It’s anything on the Internet, it’s your computer, your e-reader, tablet, desktop computer, Smartphone, gaming system and so on. If it’s a form of electronic content, then it’s probably digital media. In fact, if it has an on or off switch, you’re probably using digital media! In today’s society, I would say that individuals who are involved with online social media are quickly gaining the mindshare of different company employees and changing just as fast. With all of the benefits that social media is bringing to the corporate world, a company...

Words: 2838 - Pages: 12

Premium Essay

Cmi 5013

...Unit 5013 - Leadership practice ------------------------------------------------- ------------------------------------------------- Introduction ------------------------------------------------- ------------------------------------------------- This unit is about being able to define and show an appreciation for key leadership principles in setting and communicating organisational direction, and the application of leadership styles in the achievement of organisational objectives. It is also about being able to differentiate between the leadership and management aspects of a job role and show an understanding of how these are integrated to enable effective performance. ------------------------------------------------- ------------------------------------------------- ------------------------------------------------- Scenario ------------------------------------------------- ------------------------------------------------- Learners may use their own employment context, or that of another organisation with which they are very familiar, to base their assignment. However, in the case that they are not able to do so, please use the below scenario:- ------------------------------------------------- ------------------------------------------------- You are a manager, leading a department in a medium sized company. You have responsibility for setting direction, motivating and inspiring the team and individuals, and for co-ordinating workload and outputs...

Words: 2593 - Pages: 11

Free Essay

Cmis 102

...Course: CMIS 102  Date: 1/23/2014 Problem: Calculate the usable area in square feet of house.  Assume that the house has a maximum of four rooms, and that each room is rectangular. We are trying to calculate the square feet of a 4 bedroom house To do this, I will need to know each room’s length and breadth, then calculate each room’s area before I will then find the total. Map: When * = times Sum = total Room# =Room number Length# = length or a particular room Breadth# = breadth or a particular room Formula: Area of Room1=length1*breadth1 Area of Room2=length2*breadth2 Area of Room3=length3*breadth3 Area of Room4=length4*breadth4 The total Number of Square Foot’s = Area of room1+ Area of room2+ Area of room3+ Area of room4 Program Design Pseudo code: Start Declare the variables v ,A as integer length[4], breadth[4],area[4] as double array sum as double Display “Enter the Rooms length and Breadth” For v = 1 to 4 do Accept length[v], breadth[v] Next v Display “Finding Area and total number of square foots” Set sum =0 For A= 1 to 4 Area [A] = length [A]* breadth [A] Sum = sum + Area [A] Next A Display “Total number of square foots”, sum Stop Program Comments and Test Data C++ code: #include<iostream> #include<string> Using namespace std; int main() { int v,A; double length[4], breadth[4] ,area[4], sum; } cout<<"\nEnter the length and breadth of each room"; for (v=0;v<4;v++) { cout<<"\nRoom "<<v+1<<"...

Words: 420 - Pages: 2

Premium Essay

Cmi 7021

...CMI 7021 Unit Reference:                         7021V1 Unit Title:                         Introduction to strategic management and leadership Assessment Type:                 Assignment Assessment Centre:                Distance Learning College and Training Written by:                                                         Telephone:         Date of issue:                        Week commencing: XX 2014 Unit Reference:                         7021V1 Unit Title:                         Introduction to strategic management and leadership Assessment Type:                 Assignment Assessment Centre:                Distance Learning College and Training Written by:                                                         Telephone:         Date of issue:                        Week commencing: XX 2014 Unit Reference:                         7021V1 Unit Title:                         Introduction to strategic management and leadership Assessment Type:                 Assignment Assessment Centre:                Distance Learning College and Training Written by:                                                         Telephone:         Date of issue:                        Week commencing: XX 2014 Unit Reference:                         7021V1 Unit Title:                         Introduction to strategic management and leadership Assessment Type:                 Assignment Assessment Centre:  ...

Words: 777 - Pages: 4

Premium Essay

Cmi Level 3

...CMI Learner Statement of Authenticity – Level 3 To be completed by candidate and submitted with coursework: Centre name: | St Helens College | Candidate name: | | | CMI Number: | | Qualification title: | | Unit title(s): | | Unit code(s): | | Date due for assessment: | | Extension request date | | | | Extension granted | Y/N | Actual date evidence submitted: | | Revised due date | | Candidate declaration: | * I confirm that the work/evidence presented for assessment is my own unaided work. * I have read the assessment regulations and understand that if I am found to have ‘copied’ from published work without acknowledgement, or from other candidate’s work, this may be regarded as plagiarism which is an offence against the assessment regulations and leads to failure in the relevant unit and formal disciplinary action. * I agree to this work being subjected to scrutiny by textual analysis software if required. * I understand that my work may be used for future academic/quality assurance purposes in accordance with the provisions of the Data Protection Act 1998. * I understand that the work/evidence submitted for assessment may not be returned to me and that I have retained a copy for my records. * I have completed the assignment in accordance with CMI instructions and within the time limits set by my CMI Centre. * By signing my name below I am agreeing that I have read and understood the Learner Statement of Authenticity | Signature:...

Words: 759 - Pages: 4

Premium Essay

Cmis Hw1

...CMIS102 Homework Assignment # 1 Student Name: Matt Marshall Problem definition: Calculate the usable area in square feet of a house. Assume that the house has a maximum of four rooms, and that each room is rectangular. A. Problem Analysis – Desired Output: The sum of the two integers Required Input: 2 integers. a and b Calculations: A*B=C B. Program Design – This program will sum two integer numbers to receive a third integer number. //Declare variables Declare a,b,c as Integer // Set values of Integers Set a= Set b= Set c=a+b // Print c Print a,b,c C. Program Comments and Test Data – Following the directions in the assignment, include your test data and expected results in this section. (The Comments section is for specifics about how you designed your program, any problems you had, how you solved them, lessons learned, and how you would improve the program if you had more time. This is normally used by programmers who may come back to the program later.) Table 1. Include your test data table here. Show at least 3 examples sets of test data. Test data is normally designed before the program is written. It is used after the program is completed to test and ensure it works as it was designed to work. |Test Case # |Input |Expected Output | |1 ...

Words: 348 - Pages: 2

Premium Essay

Cmis 102

...1.What information do you consider important to be conveying to the general public regarding the impact of the acute usage of alcohol on the body? usage of alcohol can have many negative effects on the body. Over time and with long term use an individual can develop both physical and emotional symptoms. Physical symptoms can include liver failure, changes in brain function. 2. Discuss the arguments for and against classifying alcohol dependence as a disease. Are there differences with drug addiction? How about compulsive gambling? Alcoholism is a primary chronic disease with genetic psychosocial and environmental factors influencing its development and manifestations. The disease is often progressive and fatal. People use the terms drug abuse and addiction. One can abuse drugs without necessarily being addicted to drugs. Drugs abuse specifically requires that drugs have a negative effect on the user’s life. Drug addiction the addict has developed a tolerance to drugs increasing the used amount and experiences withdrawal. Compulsive gambling disorder is uncontrollable urge to keep gambling despite the tool it takes on your life. 3. One treatment method utilized for withdrawal is pharmacologic treatment. Discuss your perspectives of using pharmacologic treatment, what are the pros and cons?   treatment for alcohol withdrawal is only works if the patient is correctly taking the medication. If a patient would rather drink thank take the prescribed medication than the...

Words: 253 - Pages: 2

Premium Essay

Cmi Leadership

...1. Understanding the links and differences between management and leadership 1.1 Discuss the concept of leaders as effective managers Leadership and management go hand in hand but is not the same thing, but are linked and compliment each other. There has been debate about the difference between leadership and management. With some believing there is no distinction, while others that they should be separated in two defined roles. A common definition is: Management is about the day to day running of a function and getting the right people and resources in the right place with a focus upon implementation. Leadership is about creating a vision for that function and gaining peoples commitment by strategic direction. (NHSBT 5013 Workshop booklet) Effective management deals with resources, finances, time management and the coordination and control over these elements. Managers set goals and focus on reaching their targets. Have good organizational skills and will place people in roles to get the job the task complete. Have detailed planning taking into account adverse events that could prevent them completing task or achieving target. If the outcome gives worse results than expected an effective manager will look to provide a solution. Effective leadership deals with the people their opinions, behaviour and attitude. They will inspire and engage people to follow them and vision. Focus is on building relationships with people around them, can be an effective...

Words: 2562 - Pages: 11

Free Essay

Cmis 102

...Lot's of Stuff We all spend a lot of time and energy trying to do many things, but do we spend time on what’s really important? Indicate how much time you spend on, or how important the following are to you. (Be honest) ACTIVITY Going online to chat with friends or check emails Spending time to get a guy or girl notice you Working to get a car, or for money to buy gas and insurance Playing sports, practicing, or traveling around to compete Attending church youth functions, camps or outreach events Doing homework or studying for that exam Sitting in front of the television or surfing the Internet Listening to music or going to concerts Spending quality time alone with God LOW HIGH 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 Discussion Questions: ● ● ● ● If you feel comfortable doing so, share your answers with others in your group. Does spending time alone with God take a priority over everything else? Are there any activities in your life that you are spending too much time on? Isn't it okay to spend lots of time on things you really enjoy, as long as it isn't something bad?...

Words: 278 - Pages: 2

Free Essay

Cmis 102

...Pseudocode for the program // Declaring variables Declare Integer InternetHits[10] Declare Integer i // Loop for inputting values For i = 0 to 9 Print 'Enter the value-'    Print i+1 Input InternetHits[i] End For // End of Program. 1. #include <stdio.h> 2. int main () { 3. int internetHits[10]; 4. int hits; 5. int counter; 6. for(counter=0;counter<10;counter++){ 7. printf("Enter number of hits: "); 8. scanf("%d",&internetHits[counter]); 9. } 10. //Display Values 11. printf("Entered values are: \n"); 12. for (counter = 0;counter<10;counter++){ 13. printf("%d\n",internetHits[counter]); 14. } 15. return 0; 16. } ************************************************************************* Question Design and write a program, using functions, that calculates the area and perimeter of a rectangle whose dimensions (length and width) are provided by a user. There are 4 components of your submission including: Program Description- A detailed, clear description of the program you are building. Analysis- Demonstrates your thought process and steps used to analyze the problem. Be sure to include the required...

Words: 790 - Pages: 4

Free Essay

Cmis 102

...Program Description: The program I am building determines the square footage of homes and/or rooms. This program provides custom specification that provides the exact square footage of usable living space. Analysis: In this program the objective to obtain square feet of a house. The results are the output, which is required to know the exact square footage of the entire house. The house contains four rooms that are all rectangular. My output will be obtained by finding the area of each room. The formula to achieve this is: Length x Width (LxW). The area of each is room then summed up to determine to actual square footage of the house, which is the actual usable living space. The variable name is “a” for area which was used to test and run the program. Please see calculations and table: Area of Room 1= Length1 x Width1 (14*12)=168 Area of Room 2= Length2 x Width2 (9*12)= 108 Area of Room 3= Length3 x Width3 (8*11)= 88 Area of Room 4= Length4 x Width4 (13*13) =169 Area of Room 1 + Room 2 + Room 3 =Room 4 = Total Square footage (533) Useable square footage of a house Total number of Rooms = 4 Area=L x W of each room Variables= Area Perform Calculations: Length x Width Room 1 = 168 Length x Width Room 2 = 108 Length x Width Room 3 = 88 Length x Width Room 4 =169 Output Results: 168+108+88+169= 533 Pseudocode Test 1: #include int main () { /* variable definition: */ int a ; /* variable initialization */ a = 14*12+9*12+8*11+13*13 ;printf("Integers...

Words: 367 - Pages: 2

Free Essay

Cmis Homework 2

...<Name> Intro to Problem Solving and Algorithm Design CMIS 102 Professor March 30, 2015 My House Room 1 Length: 25’ Width: 17’ | Room 2 Length: 23’ Width: 11’ | | Room 4 Length: 23’ Width: 15’ | Room 3 Length: 25’ Width: 12’ | | Program Description * To identify the total square footage of the entire house by using mathematical equation and creating a C++ program to run the equation showing the formula and total area. Analysis * First thing is to identify the dimensions of each room and add those dimensions to get the total square footage of the house. * Variables: * L = Length * W = Width * R1 = Room 1 * R2 = Room 2 * R3 = Room 3 * R4 = Room4 * Formula: * Dimension – L x W = Room Area (sq. ft.) * Total Square Footage – R1+R2+R3+R4 = House Area (sq. ft.) Test Plan Test Case # | Input | Expected Output | Room 1 | Length: 25’ x Width: 17’ | 425 square feet | Room 2 | Length: 23’ x Width: 11’ | 253 square feet | Room 3 | Length: 25’ x Width: 12’ | 300 square feet | Room 4 | Length: 23’ x Width: 15’ | 345 square feet | Entire House | Total Square Footage = 1323 square feet | Pseudocode #include <stdio.h> int main () { /* variable definition: */ int a, b, c, d, e, f, g, h, i, j, k, l; float m,n,o,p,q; /* variable initialization */ a = 25; b = 17; c = a * b; d = 23; ...

Words: 380 - Pages: 2

Premium Essay

Cmis 102

...1. Problem definition: Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. 2. Problem Analysis: The program will inform user to input family member name, age and state. The program will take the years of all members entered and add them together and then take the total of members entered (10) and divide the total coming up with the average age. The program will also calculate and identify each state of each person entered and using the defined input identifies those people from Texas and prints their names out only. The output of the program is three fold. The total average age of all family entries, identify who is from TX and print their name out. The program is to calculate the total average of the family age wise and determine their location with only printing out those members that are from Texas (TX). The program will take inputs from the user who will input the name, age and location of each family member. The program will take the years of all members entered and add them together and then take the total of members entered (10) and divide the total coming up with the average age. The program will also calculate and identify each state of each person entered and using the defined input identifies those people from Texas and prints their names out only. The output of the program is three fold...

Words: 517 - Pages: 3

Premium Essay

Cmis 102

...1. Problem definition: Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. Note: Your problem analysis should have already been submitted as part 1 of the assignment. A. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. Complete Pseudocode With Comments: // Family Member Data // Programmer: J. West, University of Iowa // Version 1.0 – October 9, 2014 /* This program allows the user to input family data and print the average age of their family and the names of any relatives that live in the state Texas. */ // Variables used: // FamMbrName = Family member’s name (As String) // Age[ ] = Array name (As Integer) // State = State family member resides (As String) // OutOfState = Family Members that live in the state of Texas (As String) // AverageAge = Sum of age of family members divided by 10 (As Float) // Names[ ] = Array name (As String) // Count = Counter (As String) // YearsOld = Age of family members (As Integer) // Y = Identifies family member (As Integer) // Z = Identifies age (As Integer) // AgeSum = Sum of the ages of the family members (As Float) // NewAvgAge = Sum of age of family members divided by 10 (As Float) Main module Declare Names[10], FamMbrName, State, OutOfState As...

Words: 781 - Pages: 4

Premium Essay

Cmis 102 Final

...CMIS 102 Final Project CMIS 102 6984 Rebecca Rowson Due: March 29th 2015 Problem Definition: We have been contracted to develop a program that will allow a user to put in the age and names of family members along with the state that they each reside. The program will then take the ages and find the average age of the family members and print the name of anyone who lives in Texas. Problem Analysis: Desired Output: The desired output will be all input names that are from the state of Texas. As well as finding the Average age of the family members. Required Input: The user will be required to input the name of family members as well as the age of the family members and the state in which they reside. Calculations: Divide: totalage / numfamily Program Design: To start out this program out I will set the array “familymembers[50]” to 0. Then I will set “newmember” to 1 set as integer. Then I will set the array “state[50]” to 0, set “count” to 1, set “totalage” to 0, set “numfamily” to 0, set “age” to 0, set “Aveage” to 0. We will then display "We will now require you to input information about your family members, beginning with name.” Start a loop on the condition that “newmember” = 0 or “count” > 50. If No then the user will be asked to input the name of a family member and will store it in “familymembers[count]”. Next they will be asked what state this family member lives in and store it in “state[count]”. We will lastly ask the user how old this family member...

Words: 617 - Pages: 3