HOMEWORK 1

HOMEWORK 1 - turnin -c me9x hw1.c 2. Turnin renames your...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
HOMEWORK 1: /* MAE 9: Homework #1, Spring 2007 Due on Thursday, April 12, Turnin time from 9:00am-9:00pm Write a C program (hw1.c) that: A. prints on the terminal screen a sentence: "I am writing my first C program." Print this sentence three times, each time in a separate (consequtive) line. B. prints a sentence: "It represents my hw1 C assignment." twice on the terminal screen, both appearing in the same line; leave two empty spaces between the sentences. Leave one empty line at the beginning of the output, two empty lines between parts A and B, and one empty line at the end. Also, insert Part A and Part B designations as shown below. ....................................................................... Your output should look like this: Part A: I am writing my first C program. I am writing my first C program. I am writing my first C program. Part B: It represents my hw1 C assignment. It represents my hw1 C assignment. ........................................................................ Notes: 1. Turn in the program by using the tool turnin:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: turnin -c me9x hw1.c 2. Turnin renames your file with your username, so that we know who is the author. There is no need for you to change the name of the homework files. 3. Each time you submit something with turnin, you overwrite the previous file. */ #include <stdio.h> main() { int k; printf("\n"); /* Use a for loop to repeat statements */ printf("Part A:\n\n"); for(k=0; k<3; k++) { printf("I am writing my first C program.\n"); } printf("\n\n"); /* 6 pts */ printf("Part B:\n\n"); for(k=0; k<2; k++) { printf("It represents my hw1 C assignment. "); } printf("\n\n"); /* 6 pts */ // Alternatively, without a for loop: printf("\n"); printf("Part A:\n\n"); printf("I am writing my first C program.\n"); printf("I am writing my first C program.\n"); printf("I am writing my first C program.\n"); printf("\n"); // 6 pts printf("Part B:\n\n"); printf("It represents my hw1 C assignment. It represents my hw1 C assignment."); printf("\n\n"); // 6 pts }...
View Full Document

Page1 / 2

HOMEWORK 1 - turnin -c me9x hw1.c 2. Turnin renames your...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online