<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CS508 Assignment No. 01  Solution and Discussion]]></title><description><![CDATA[<p dir="auto">[left]Assignment No. 01[/left] [right]Semester Fall 2019[/right]<br />
CS508- Modern Programming Languages 	Total Marks: 20</p>
<p dir="auto">Due Date:   Tuesday, 12 November 2019.</p>
<p dir="auto">Instructions<br />
Please read the following instructions carefully before solving &amp; submitting assignment:<br />
It should be clear that your assignment will not get any credit if:<br />
•	The assignment is submitted after due date.<br />
•	The submitted assignment does not open or file is corrupt.<br />
•	The assignment is completely or partially copied from (other student or ditto copied from handouts or internet).<br />
•	Student ID is not mentioned in the assignment File or name of file is other than student ID.<br />
•	The assignment is not submitted in .doc or .docx format.<br />
Uploading instructions<br />
Your submission must include:<br />
•	Assignment should be in .doc or .docx format.<br />
•	Save your assignment with your ID (e.g. bx180200786.doc).<br />
Assignment submission through email is NOT acceptable<br />
Objective<br />
The objective of this assignment is to learn how we can evaluate different programming languages based on syntax.<br />
Note:<br />
Your answer must follow the below given specifications.<br />
•	 Font style: “Times New Roman”<br />
•	 Font color: “Black”<br />
•	 Font size: “12”<br />
•	 Bold for heading only.<br />
•	 Font in Italic is not allowed at all.<br />
•	Your answer should be precise and to the point, avoid irrelevant detail.</p>
<p dir="auto">Lectures Covered: This assignment covers Lecture # 01 – 07<br />
Deadline<br />
Your assignment must be uploaded/submitted at or before Tuesday, 12 November 2019.</p>
<p dir="auto">In this assignment we will evaluate 3 different languages on the basis of CPU time and Memory used for compilation.<br />
3 languages we will be using are:<br />
•	Java<br />
•	C#<br />
•	C++<br />
We will use nested loop which will execute finite number of times. For the sake of consistency, we will be using an online compiler of each language from the same website.<br />
First you need to calculate the number of time both loops will run, for that we will use student id.<br />
From the last 4 numbers of student id, first two characters will be number of times the outer loop will execute and last two characters will be number of times the inner loop will execute.<br />
So, for example if student id is BC180201429 then 	 <img src="/assets/uploads/files/1573476749898-b3700d9e-9af3-42a2-a3a5-0e283bb1c2c0-image.png" alt="b3700d9e-9af3-42a2-a3a5-0e283bb1c2c0-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The outer loop will execute 14 times and inner loop will execute 29 times.<br />
Use the following compiler <a href="https://www.jdoodle.com/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.jdoodle.com/</a>.</p>
<ol>
<li>
<p dir="auto">Note down the CPU Time and memory Used for all the languages and fill the following table with CPU time memory and write the code for all 3 languages also take screen shots for each language and paste it in your solution file.<br />
Language	Code 	CPU Time	Memory Used<br />
<img src="/assets/uploads/files/1573476723126-736d9677-6cb8-4ece-b665-09b46c738031-image.png" alt="736d9677-6cb8-4ece-b665-09b46c738031-image.png" class=" img-fluid img-markdown" /></p>
</li>
<li>
<p dir="auto">You must write your student ID and language name in the code so it can be shown in the screen shot as attached below:</p>
</li>
<li>
<p dir="auto">You are required to attach screen shots for all 3 languages showing output and resources used.</p>
</li>
</ol>
<p dir="auto"><img src="/assets/uploads/files/1573476635269-6c0ca58e-6108-4e8e-8b9d-34dbf3fb989e-image.png" alt="6c0ca58e-6108-4e8e-8b9d-34dbf3fb989e-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.secnto.com//topic/535/cs508-assignment-no-01-solution-and-discussion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 23:01:19 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/535.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Nov 2019 12:52:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS508 Assignment No. 01  Solution and Discussion on Thu, 16 Jan 2020 08:26:23 GMT]]></title><description><![CDATA[<p dir="auto"><strong>Solution:</strong><br />
Java:</p>
<pre><code>public class MyClass {
    public static void main(String args[]) {
        System.out.println("My id is BC180401429");
        System.out.println("** Language is JAVA **");
        
        for(int i=0;i&lt;=14;i++){
            for(int j=0;j&lt;=29;j++){
                System.out.print("Outer:"+i+"Inner:"+j);
            }
        }

    }
}

</code></pre>
<p dir="auto"><img src="https://i.imgur.com/8P6CdT9.png" alt="5608a2a6-7df7-4a31-9212-8e1f6b861c3a-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">C#:</p>
<pre><code>using System;

class Program
{
    static void Main() {
        Console.WriteLine("My id is BC180401429");
        Console.WriteLine("** Language is C# **");
        
        for(int i=0;i&lt;=14;i++){
            for(int j=0;j&lt;=29;j++){
                Console.Write("Outer:"+i+"Inner:"+j);
            }
        }
        
        
    }
}

</code></pre>
<p dir="auto"><img src="https://i.imgur.com/Vf2OntD.png" alt="cbc743d8-98fa-445b-9f7e-70c3fee295de-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">C++:</p>
<pre><code>#include &lt;iostream&gt;

using namespace std;

int main() {
       cout&lt;&lt; "My id is BC180401429 \n";
       
       cout&lt;&lt; "** Language is C++ ** \n";
        
        for(int i=0;i&lt;=14;i++){
            for(int j=0;j&lt;=29;j++){
                cout&lt;&lt; "Outer:"&lt;&lt;i&lt;&lt;"Inner:"&lt;&lt;j;
            }
        }
    
}

</code></pre>
<p dir="auto"><img src="https://i.imgur.com/vWPXez6.png" alt="d8150fad-1df3-4376-b59b-fcfa4dfb6dba-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.secnto.com//post/2204</link><guid isPermaLink="true">https://community.secnto.com//post/2204</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Thu, 16 Jan 2020 08:26:23 GMT</pubDate></item><item><title><![CDATA[Reply to CS508 Assignment No. 01  Solution and Discussion on Wed, 13 Nov 2019 16:57:22 GMT]]></title><description><![CDATA[<pre><code>using System;

class Program
{
static void Main() {

Console.Write("My Student is is BC160401656 \n");
Console.Write("My Language is C#");

    int outerloop=1;
    int innerloop=1;
    for (int i=1;i&lt;=29;i++){
        Console.Write("outerloop:" + outerloop++);
        if (outerloop == 30){
            Console.Write("\n----------\n");
            for (int j=1;j&lt;=79;j++){
                Console.Write("ïnnerloop:" + innerloop++);
            }
        }
    }
    
}
}
</code></pre>
]]></description><link>https://community.secnto.com//post/1512</link><guid isPermaLink="true">https://community.secnto.com//post/1512</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Wed, 13 Nov 2019 16:57:22 GMT</pubDate></item><item><title><![CDATA[Reply to CS508 Assignment No. 01  Solution and Discussion on Wed, 13 Nov 2019 16:48:43 GMT]]></title><description><![CDATA[<pre><code>public class MyClass {
    public static void main(String args[]){
        System.out.println("My id is BS12345678");
        System.out.println("My language is Java");
        int outerloop=1;
        int innerloop=1;
        for(int i=1;i&lt;=29;i++){
            System.out.print("outerloop:" + outerloop++);
            
            if (outerloop == 30){
                System.out.println("\n----------\n");
                for(int j=1;j&lt;=79;j++){
                    System.out.print("innerloop:" + innerloop++);
                }
            }
            
        }
    }
}
</code></pre>
]]></description><link>https://community.secnto.com//post/1511</link><guid isPermaLink="true">https://community.secnto.com//post/1511</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Wed, 13 Nov 2019 16:48:43 GMT</pubDate></item><item><title><![CDATA[Reply to CS508 Assignment No. 01  Solution and Discussion on Wed, 13 Nov 2019 15:52:26 GMT]]></title><description><![CDATA[<p dir="auto">Correct Solution of C++</p>
<pre><code>#include &lt;iostream&gt;
using namespace std;
int main() {
int outerloop=1;
int innerloop=1;
    cout&lt;&lt;"My Student ID is BS12345678\n";
    cout&lt;&lt;"My coding Language is C++\n\n";
for(int i=1;i&lt;=29;i++){
    cout&lt;&lt;"outerloop:"&lt;&lt;outerloop++;

    if (outerloop == 30){
        cout&lt;&lt;"\n.......\n";
        for(int j=1;j&lt;=79;j++){
        cout&lt;&lt;"innerloop:"&lt;&lt;innerloop++;

        }
    }
}
}
</code></pre>
]]></description><link>https://community.secnto.com//post/1510</link><guid isPermaLink="true">https://community.secnto.com//post/1510</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Wed, 13 Nov 2019 15:52:26 GMT</pubDate></item><item><title><![CDATA[Reply to CS508 Assignment No. 01  Solution and Discussion on Wed, 13 Nov 2019 14:07:26 GMT]]></title><description><![CDATA[<p dir="auto">Idea Solution<br />
<a href="https://youtu.be/ZPvQdXLF6EI" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/ZPvQdXLF6EI</a></p>
]]></description><link>https://community.secnto.com//post/1509</link><guid isPermaLink="true">https://community.secnto.com//post/1509</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Wed, 13 Nov 2019 14:07:26 GMT</pubDate></item><item><title><![CDATA[Reply to CS508 Assignment No. 01  Solution and Discussion on Tue, 12 Nov 2019 10:33:34 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://drive.google.com/file/d/1fgY6Iyc-8sR2FlXUKxT6ypH0gTjjBzc0/view" target="_blank" rel="noopener noreferrer nofollow ugc">CS508 Assignment 1  Solution Ideas…</a></p>
]]></description><link>https://community.secnto.com//post/1457</link><guid isPermaLink="true">https://community.secnto.com//post/1457</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Tue, 12 Nov 2019 10:33:34 GMT</pubDate></item><item><title><![CDATA[Reply to CS508 Assignment No. 01  Solution and Discussion on Tue, 12 Nov 2019 09:21:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cyberian" aria-label="Profile: cyberian">@<bdi>cyberian</bdi></a><br />
Please and check and any suggestion?<br />
<a href="https://youtu.be/ZPvQdXLF6EI" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/ZPvQdXLF6EI</a></p>
]]></description><link>https://community.secnto.com//post/1456</link><guid isPermaLink="true">https://community.secnto.com//post/1456</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Tue, 12 Nov 2019 09:21:52 GMT</pubDate></item><item><title><![CDATA[Reply to CS508 Assignment No. 01  Solution and Discussion on Tue, 12 Nov 2019 09:21:07 GMT]]></title><description><![CDATA[<p dir="auto">Java:</p>
<pre><code>public class MyClass {
public static void main(String args[]) {

System.out.println("My Student ID is BC160401656");
System.out.println("My Language is JAVA");
}
}
</code></pre>
<p dir="auto">C#:</p>
<pre><code>using System;

class Program
{
static void Main() {

Console.Write("My Student is is BC160401656 \n");
Console.Write("My Language is C#");
}
}
</code></pre>
<p dir="auto">C++:</p>
<pre><code>#include &lt;iostream&gt;

using namespace std;

   int main() {

    cout"MY Student ID is BC160401656 \n " ;

    cout"Language is C++" ;

}
</code></pre>
]]></description><link>https://community.secnto.com//post/1455</link><guid isPermaLink="true">https://community.secnto.com//post/1455</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Tue, 12 Nov 2019 09:21:07 GMT</pubDate></item></channel></rss>