Site Discription

Welcome to JalalZoon Website

This is Educational website.You can search for Programming languages mostly HTML, CSS, PHP and Java.This website also contains data about Study Techniques and tips for study effectively. Math tutorials are included very Soon.

Search your content here!!!

Monday, May 28, 2018

CS310 assignment 2 Solution file

CS310 assignment 2 Solution

PHP code is following

<?php

echo"Please Select one Option\n\n";

echo"1-Draw Right Angle Triangle of asterisk(*)\n";
echo"2-Draw Pyramid of of asterisk(*)\n";
echo"3-Draw Reverse Pyramid of of asterisk(*)\n\n";

$option = true;

while($option == true)
{
echo"Enter Your Option: ";
$temp = fopen("php://stdin","r");
$line = fgets($temp);

if($line == 1)
{
for($i=1; $i <= 6; $i++)
{
for($j = 1; $j <= $i; $j++)
{
echo "* ";
}
echo"\n";
}
}
elseif($line == 2)
{
for($i=1; $i <= 6; $i++)
{
for($j = 6-$i; $j >= 1; $j--)
{
echo " ";
}
for($k = 1; $k <= $i; $k++)
{
echo"* ";
}
echo "\n";
}
}
elseif($line == 3)
{
for($i=6; $i >= 1; $i--)
{
for($j = 1; $j <= 6-$i; $j++)
{
echo " ";
}
for($k = 1; $k <= $i; $k++)
{
echo" *";
}
....
..... get full code in bellow file
Download CS310 full Assignment 2 Solution.docx

Type your Comments

Comment Box is loading comments...

Like website using facebook

12th Class Math || Ch 1 Function and Limits || Exercise 1.3 Question no 2

12th Class Math || Ch 1 Function and Limits || Exercise 1.3 Question no 2 12th Class Math || Ch 1 Function and Limits || F.S.C. & I.C.S ...

Contact Us for more help

Name

Email *

Message *