#include<iostream.h>
#include<conio.h>
void main()
{
char g;
int m;
cout<<”\nEnter the marks”;
cin>>m;
if(m>=90&&m<=100)
g=’A’;
else if(m>=81)
g=’B’;
else if(m>71)
g=’C’;
else if(m>61)
g=’D’;
else if(m>51)
g=’E’;
else if(m>41)
g=’F’;
else
g=’U’;
if(g==’A’)
cout<<”\nGreat!”;
else
cout<<”\nNot Great”;
getch();
}
<u>Explanation:</u>
Here, we are declaring two variables g(char data type) and m(int data type) to get the grade and the mark respectively. We’ll enter the mark less than 100 and check it under certain conditions to assign the grade to the variable g.
So at the end we will check whether the grade given is ‘A’. If condition is true, the program will display “Great!”. Otherwise it’ll print “Not Great”.
Answer:
1. #include <iostream>
2. #include <cmath>
3.
4. using namespace std;
5.
6. int main()
7. {
8. float radius;
9. cout << "Type the radius of the base: "; // Type a number
10. cin >> radius ; // Get user input from the keyboard
11.
12. float height;
13. cout << "Type the height: "; // Type a number and press enter
14. cin >> height; // Get user input from the keyboard
15.
16. float volumeCylinder = 3.1416 * radius * radius * height;
17. float cubeSide = std::pow(volumeCylinder, 1/3.);
18. cout<<"Cube side is: "<< cubeSide;
19.
20. return cubeSide;
21. }
Explanation:
- From line 1 to 5 we include two libraries
- From line 6 to 7 we declare our main function
- From line 8 to 11 we ask the user for the radius of the cylinder
- From line 12 to 15 we ask the user for the height of the cylinder
- On line 16 we calculate the volume of the cylinder using the formula V=pi*(r^2)*h
- On line 17 we calculate the side of the cube with the same volume as the cylindrical container using the formula side=∛(V)
- From line 18 to 21 we print and return the value of the cube's side
Answer:
The correct option to the following question is D.).
Explanation:
SDLC stands for the System Development Life Cycle.
The aim of the SDLC is to produce the high quality of the software that exceeds or meets the reaches completions and customers' expectations with costs and time expectations.
Software Development Life Cycle is the frameworks that defining the task performed at each of the steps in software development process.
A hybrid network is any computer network that uses more than one type of connecting technology or topology. For example, a home network that uses both Wi-Fi and Ethernet cables to connect computers is a hybrid.
Answer:
Required code is given below:
Explanation:
def add_to_dict(dictt, key,value):
if key in dictt.keys():
print("Error. Key already exists.")
else:
dictt[key]=value
return dictt
def remove_from_dict(dictt,key):
try:
dictt[key]
dictt.pop(key, None)
return dictt
except KeyError:
print("No such key exists in the dictionary.")
def find_key(dictt,key):
try:
value=dictt[key]
print("Value: ", value)
except KeyError:
print("Key not found.")