Answer:
ppl
Explanation:
asfafgdffsghsdfghdgsghdfghtrbd54445 ddfgg
Answer:
See explaination
Explanation:
#include <iostream>
using namespace std;
int main()
{
double h, w;
int s, a, b;
cout<<"height in feet: ";
cin>>h;
cout<<"width in feet: " ;
cin>>w;
cout<<"tile size in inches:";
cin>>s;
int height = h*12;
if(height%s==0)
a = height/s;
else
a = height/s + 1;
int width = w*12;
if(width%s==0)
b = width/s;
else
b = width/s + 1;
cout<<"Number of tiles: "<<a*b;
}
D, To communicate with a computer through a device or program :)
Answer: Ten is not called onety because you have ten fingers and not nine. That part is actually extremely logical and straightforward. Besides, what do you think "ty" actually means? You suggest that we say "one ten" every time we want to say "ten". Now that is illogical.
Explanation:
Answer:
void mn(int m, int n){
int sum = 0;
int count = 0;
if(m<n){
for(int i = m;i<=n;i++){
sum+=i;
}
}
else{
for(int i = n;i<=m;i++){
sum+=i;
}
}
count = abs(m - n)+1;
cout<<"Sum: "<<sum<<endl;
cout<<"Average: "<<(float)sum/count;
}
Explanation:
This line defines the method
void mn(int m, int n){
This initializes sum and count to 0
int sum = 0;
int count = 0;
This checks if m is less than n
if(m<n){
This iterates from m to n and calculates the sum of numbers between this interval
<em> for(int i = m;i<=n;i++){</em>
<em> sum+=i;</em>
<em> }</em>
<em> }</em>
If otherwise,
else{
This iterates from n to m and calculates the sum of numbers between this interval
<em> for(int i = n;i<=m;i++){</em>
<em> sum+=i;</em>
<em> }</em>
<em> }</em>
This calculates the range from m to n using absolute function
count = abs(m - n)+1;
This prints the calculated sum
cout<<"Sum: "<<sum<<endl;
This calculates and prints the average
cout<<"Average: "<<(float)sum/count;
}
<em>See attachment for complete program that includes the main (in c++)</em>