12-05-2014, 02:31 PM
CS508 Modern Programming Languages Assignments No. 2 Discussions and Solutions Fall 2014 Due Date: Dec 09, 2014
Uploading instructions
Your submission must include:
Assignment should be in .doc or docx format.
Save your assignment with your ID (e.g. bx020200786.doc).
Assignment submission through email is highly discouraged
Objective
The objective of this assignment is
To give some comparison, knowledge of syntax of SNOBAL and Ada programming languages. It will also enable student how write simple programs in SNOBAL and Ada programming languages.
Note:
Your answer must follow the below given specifications.
Font style: “Times New Roman”
Font color: “Black”
Font size: “12”
Bold for heading only.
Font in Italic is not allowed at all.
No formatting or bullets are allowed to use.
Your answer should not exceed 10 lines each.
Lectures Covered: This assignment covers Lecture # 9-17
Deadline
Your assignment must be uploaded/submitted at or before 09/12/2014.
Question No. 01:
a. Being a member of a software development team which requires developing software for defense organization, needing to run for more than 20 years. Which of the following programming language you will prefer? Justify your answer with solid arguments. Marks: 04
i) SNOBAL
ii) Ada
iii) FORTRAN
b. Write the program in SNOBOL that outputs the square of numbers between 1 and 15. Marks: 06
Question No. 02:
Ada is one of the strongest and standardized programming languages. Like C/C++, Ada also has rich set of operators. Consider the following C++ code and write code in Ada programming language to get the similar results by using the same variables, loop etc. Marks : 10
#include<iostream.h>
main (int argc, char *argv[])
{
int n;
int i=1;
int fact=1;
cout"please enter a number\n";
cin>>n;
if(n<=1)
return 1;
while(i<n)
{
fact= fact*i;
i++;
}
coutn"! ="fact;
system("pause");
}
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
