CIS6-Introduction to Programming E. Homework #1-Page 2 of 3 I. Coding Assignment
ID: 3747649 • Letter: C
Question
CIS6-Introduction to Programming E. Homework #1-Page 2 of 3 I. Coding Assignment Exercise 1 Due Thursday, September 13 (1) Wri (2) Fir C program to display the outpat given below. rst, the program should display the following information: te a cis 6 c Introduction to Pxogamming Dsing e Laney College Your Name Assignment Information - Assignment Nunber: Homework 1. Written by Submitted Date: coding Assignment-Exercise #1 Your Nane Due Date Date" with the You need to replace "Your specified due date Name" with your real name and "Due (3) Then, the program will continue to display the first two initials of your first name and last name. The program will also print the total numbers of cach of the two initials The formats for the initials are specified as follows, The initial of your first name must be eleven (11) columns for the width and nine rows for the height. The initial of your last name must be nine (9) columns for the width and nine (9) rows for the height. - - There is at least one blank column between the two initials Let assume that a person has the name of "Co Vang. The output may be as follows. There are 23 C's, and 17 V's There are 40 characters in total. Save your program with cis6Fa112018YourNameHwlEx1.e as its filename.Explanation / Answer
#include <stdio.h>
int main()
{
printf("CIS 6 - Introduction to Programming (Using C)"); //print "CIS 6 - Introduction to Programming (Using C)"
printf(" Laney College"); //print "Laney College" in new line
printf(" Ram Krishna"); //print "Your Name" instead of "Ram Krishna" in new line
printf(" Assignment Information --"); //print "Assignment Information --" in new line
printf(" Assignment Number : Homework #1,"); //print "Assignment Number : Homework #1," in new line
printf(" Coding nAssignment -- #1"); //print "Coding nAssignment -- #1" in new line
printf(" Written by : Ram Krishna"); //print "Written by : Your Name instead of "Ram Krishna" in new line
printf(" Submitted Date: Thursday, September 13, 2018"); //print "Submitted Date: Due Date" in new line
/*printing first two imitials of my first name("R") and last name("K") with blank spaces between first and last name initials
*this must be first name and last name initial of your name
*Logic of the program:
*Desing your First name initial with printf statements so that it must occuppy 11 columns of width and 9 rows of height
*Once this is done, maintain a 11 columns width in all printf statements using space character and then provide blank space between first and last name initials
*Desing your Last name initial so that it must occuppy 9 columns of width and 9 rows of height
*Put this one in the respective rows of first name initial printf statements, then you will get desired output
*/
//columns:1-11 for R and 2 blank spaces and 1-9 for K
printf(" RRRRRRRRRR K K");//1st row
printf(" R R K K");//2nd row
printf(" R R K K");//3rd row
printf(" R R K K");//4th row
printf(" RRR K");//5th row
printf(" R R K K");//6th row
printf(" R R K K");//7th row
printf(" R R K K");//8th row
printf(" R R K K");//9th row
printf(" There are 27 R's , and 17 K's");//make a count of first and last name initials and print the same
printf(" There are 44 characters total");//print sum total characters
return 0;
}