Answer:
Sia la variabile semplice che la variabile strutturata possono avere il diverso set di valori, ma entrambi differiscono poiché la variabile semplice può contenere solo i valori di un tipo di dati. Tuttavia, la variabile strutturata può contenere la variabile di diversi tipi di dati come la struttura in c ++ ed elencare in Python. Ci sono anche molti altri esempi.
Ad esempio in c ++:
int num; è una variabile semplice
e struct class
{
int roll;
string name;
} class[25];
è una variabile strutturata che può memorizzare i dettagli dei 26 studenti.
Explanation:
Si prega di controllare la sezione di risposta.
Answer:
#include <iostream>
#include<iomanip>
using namespace std;
int main()
{
double caffeineMg;
cin>>caffeineMg;
cout<<"After 6 hours: "<<fixed<<setprecision(2)<<caffeineMg/2.0<<" mg\n";
cout<<"After 12 hours: "<<fixed<<setprecision(2)<<caffeineMg/4.0<<" mg\n";
cout<<"After 24 hours: "<<fixed<<setprecision(2)<<caffeineMg/8.0<<" mg\n";
return 0;
}
Explanation:
- Take the caffeine as input from user.
- Calculate by dividing this value with relevant half life.
- Use setprecision(2) to display 2 digits after decimal point.
Answer:
Explanation:
As a computer science student information is accessed in every possible way. This can be through a local school lan network, mobile devices, e-mail, etc. All of these help information flow to and from various people and makes obtaining this information incredibly simple as a student. Especially in the field of computer science, I need to integrate as many ICT devices with me in my everyday life, to send emails, check calendar updates, research information on the web, check school reports, and even speak with clients.