[Solved] CSE107 Lab7-Program to draw a perpendicular triangle

$25

File Name: CSE107_Lab7-Program_to_draw_a_perpendicular_triangle.zip
File Size: 489.84 KB

SKU: [Solved] CSE107 Lab7-Program to draw a perpendicular triangle Category: Tag:
5/5 - (1 vote)

Write a C program that performs the task described below. Name your c file as nameSurnameId_tasknumber.c [ex: seydanurAhi171561011_1.c]

Upload your file to your sections submission page on moodle.

Arrays in C special data structure which is used for list of values, manipulation of memory space.

Tasks:

  1. C program to draw a perpendicular triangle with *.

Ex:

*

**

***

****

*****

  1. C program to draw pyramid with *. Ex height 4:

*

***

*****

*******

Hint: According to bottom line, find the number of blank characters at the first line(how many blank is at right side and how many blank is at left side?). If height of pyramid is 4, then bottom line has got 7 asterix ((4-1)*2+1). First line has got 6 blank (4-1 left side and 4-1 right side) characters and one Asterix (at the middle.

  1. C program to print all the composite numbers from 2 to a certain number entered by user.

Enter a number:15

4 is composite 6 is composite

  • is composite
  • is composite
  • is composite

12 is composite

  • is composite
  • is composite

Hint: A composite number (bileik say) is a positive integer that can be formed by multiplying two smaller positive integers.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSE107 Lab7-Program to draw a perpendicular triangle
$25