Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

One Area CSecure https//www.cs.clemson.edu/course/cpsc111/S18Labs/lab5.pdf ab Assignment Reminder About Style, Formatting, and Commenting Requirements . The top of your file should have a header comment, which

image text in transcribed

One Area CSecure https//www.cs.clemson.edu/course/cpsc111/S18Labs/lab5.pdf ab Assignment Reminder About Style, Formatting, and Commenting Requirements . The top of your file should have a header comment, which should contain: o Your name o Date o Lab section o Lab number o Brief description about what the program does o Any other helpful information that you think would be good to have. . Variables should be declared at the top of the main function, and should have meaningful names. .One exception to the rule of using meaningful names for variables is to use i or j or n or some other single letter as a loop index variable name; this is a common, acceptable practice. Always indent your code in a readable way. Some formatting examples may be found here: https:people es clemson edu/-chochri/Assignments/Formatting Examples pdf Don't forget to use the -Wall flag when compiling, for example gcc -Wal1 lab5.c . Create a file called labs.c. In it, provide a C program that will do the following: 1. Prompt the user to enter a character. Note: Use fprintf and fscanf functions throughout your program. 2, Then prompt the user to enter an integer for the height of an isosceles triangle. This will be the same value for the base 3. Use loops to draw an isosceles triangle made of the character that the user entered, and using the height entered by the user NOTE: When printing the character, print t with a space immediately aftler the character so the characters are evenly spaced throughout the triangle. For example, with no spaces after the character, your shape will print like this: AANA Whereas, with a space after each character, your shape will print like this (which is how it should be) 4. 5. Print the value for the area of the triangle with that height (base would be the same as height). Sample outputs are shown on next page. 1:05 PM Type here to search ^. 2/14/2018 19

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 15th International Conference Dexa 2004 Zaragoza Spain August 30 September 3 2004 Proceedings Lncs 3180

Authors: Fernando Galindo ,Makoto Takizawa ,Roland Traunmuller

2004th Edition

3540229361, 978-3540229360

More Books

Students also viewed these Databases questions