Professional Documents
Culture Documents
Submitted by:
ID:
Submitted to
As we have chosen 5 different data variables for our system. So, we will
explain each data types step by step.
1. For no of room we can select the data type as integer because room no is type of whole
no. it may be 100, 200 etc.
2. For no of beds there may be fixed beds in any room but may not be in decimal or
fraction that’s why we chose as a double data type
3. In case of meal type there may be different variant for example vegetarian, non-
vegetarian, cutting bulking etc. so, we have chosen string or char data type.
4. For a room service a person may be interested or not because of his privacy that’s why
we choose Boolean.
5. Rent price can vary in range of decimal that is reason we have chose double or float.
Task 2:
As my id is 19F19778
So
1.
d*10/2^a-(6*b%f)
9*10/2^(6*9%7)
= 9*5^(6*2)
= 45^12
=40
2.
Not(a<b)AND(20%d<=0)OR(e>f)
NOT(1<9)AND(20%9<=0)OR(7>7)
NOT(False) AND(2<=0)OR False
=True AND False OR False
= True AND False
= False
Task 3:
a)
Pseudocode
b)
Pseudocode
Pseudocode
2. Step 2: Print "Enter the marks of 3 students from session A acheived in the module
Fundamentals of Programming:"
3. Step 3: Read s1_mark1, s1_mark2 and s1_mark3.
4. Step 4: Print "Enter the marks of 4 students from session B acheived in the module
Fundamentals of Programming:"
5. Step 5: Read s2_mark1, s2_mark2, s2_mark3 and s2_mark4
8. Step 8: Compute
tot_avg=(s1_mark1+s1_mark2+s1_mark3+s2_mark1+s2_mark2+s2_mark3+s2_mark4)/7;
9. 4. Display the Average of Session A, Session B and Overall:
Flowchart
d)
Pseudocode:
Step 2: Print "Enter the marks of 3 students from session A acheived in the module
Fundamentals of Programming:"
Step 4: Print "Enter the marks of 4 students from session B acheived in the module
Fundamentals of Programming:"
Step 8: Compute
tot_avg=(s1_mark1+s1_mark2+s1_mark3+s2_mark1+s2_mark2+s2_mark3+s2_mark4)/7;
#include <iostream>
int main()
cout<<"Enter the marks of 3 students from session A acheived in the module Fundamentals of
Programming:";
cin>>s1_mark1>>s1_mark2>>s1_mark3;
cout<<"\nEnter the marks of 4 students from session B acheived in the module Fundamentals of
Programming:";
cin>>s2_mark1>>s2_mark2>>s2_mark3>>s2_mark4;
s1_avg=(s1_mark1+s1_mark2+s1_mark3)/3;
s2_avg=(s2_mark1+s2_mark2+s2_mark3+s2_mark4)/4;
tot_avg=(s1_mark1+s1_mark2+s1_mark3+s2_mark1+s2_mark2+s2_mark3+s2_mark4)/7;
return 0;
}
References:
1. OCW MIT, Signals and system ,viewed 20 OCT 2021,
<https://ocw.mit.edu/resources/res-6-007-c programming -spring-2011/ /. >
2. McTavish, C., & Sankaranarayanan, S. (2010, May). Intelligent agent based hotel search
& booking system. In 2010 IEEE International Conference on Electro/Information
Technology (pp. 1-6). IEEE.
3. Strachey, C. (2000). Fundamental concepts in programming languages. Higher-order
and symbolic computation, 13(1), 11-49.
4. Ros, J., Arrondo, L., Gil, J., & Iriarte, X. (2007). LIB3D MEC–GINAC, A LIBRARY FOR
SYMBOLIC MULTIBODY DYNAMICS. ECCOMAS Multibody Dynamics, Milano.