Answer:
3
Explanation:
= 1 + (int) (4*(63 - 51)/(71-51)))
= 1 + (int) (4*12/20)
= 1 + (int) (48/20)
= 1 + (int)2.4
= 1 + 2
= 3
Answer:
To find the solution of Global warming, to find the combination of some drugs and test them, etc.
Explanation:
Distributed computing can be described as when a number of computers connected on the network communicate with each other by passing messages, and these systems are known as distributed systems.
There are various goals that can be accomplished using distributed computing, one of them is to find the solution of Global warming, by coordinating with different areas.
Another one is to find the combination of some drugs and test them to make new medicine.
Answer:
// here is code in C++
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
int n,no_open=0;
cout<<"enter the number of lockers:";
// read the number of lockers
cin>>n;
// initialize all lockers with 0, 0 for locked and 1 for open
int lock[n]={};
// toggle the locks
// in each pass toggle every ith lock
// if open close it and vice versa
for(int i=1;i<=n;i++)
{
for(int a=0;a<n;a++)
{
if((a+1)%i==0)
{
if(lock[a]==0)
lock[a]=1;
else if(lock[a]==1)
lock[a]=0;
}
}
}
cout<<"After last pass status of all locks:"<<endl;
// print the status of all locks
for(int x=0;x<n;x++)
{
if(lock[x]==0)
{
cout<<"lock "<<x+1<<" is close."<<endl;
}
else if(lock[x]==1)
{
cout<<"lock "<<x+1<<" is open."<<endl;
// count the open locks
no_open++;
}
}
// print the open locks
cout<<"total open locks are :"<<no_open<<endl;
return 0;
}
Explanation:
First read the number of lockers from user.Create an array of size n, and make all the locks closed.Then run a for loop to toggle locks.In pass i, toggle every ith lock.If lock is open then close it and vice versa.After the last pass print the status of each lock and print count of open locks.
Output:
enter the number of lockers:9
After last pass status of all locks:
lock 1 is open.
lock 2 is close.
lock 3 is close.
lock 4 is open.
lock 5 is close.
lock 6 is close.
lock 7 is close.
lock 8 is close.
lock 9 is open.
total open locks are :3
Well you only need the light when it's burning low
Only miss the sun when it starts to snow
Only know you love her when you let her go
Only know you've been high when you're feeling low
Only hate the road when you're missing home
Only know you love her when you let her go
And you let her goStaring at the bottom of your glass
Hoping one day you'll make a dream last
But dreams come slow and they go so fast
You see her when you close your eyes
Maybe one day you'll understand why
Everything you touch surely dies'Cause you only need the light when it's burning low
Only miss the sun when it starts to snow
Only know you love her when you let her go
Only know you've been high when you're feeling low
Only hate the road when you're missing home
Only know<span>…</span>