To stay organized on an online school is no cursing. and keep your files clean and organized
Answer:
// here is code in c++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main() {
// variable
int num;
int tot_sum=0;
cout<<"enter a number: ";
// read the value of n
cin>>num;
// check the multiple of 2 or 5 from 1 to n
for(int x=1;x<=num;x++)
{
// if multiple of 2 or 5 then add them
if(x%2==0 ||x%5==0)
{
tot_sum=tot_sum+x;
}
}
// print the sum
cout<<"sum of multiple of 2 or 5 is:"<<tot_sum<<endl;
return 0;
}
Explanation:
Read the number "n" from user.Check every number from 1 to n, if it is a multiple of 2 or 5 then add them to "tot_sum".When the for loop end, "tot_sum" will have sum of all the number which are either multiple of 2 or 5.Print the sum.
Output:
enter a number:11
sum of multiple of 2 or 5 is:35
Explanation:
The below code has been written in C language
void rotateright(int list[], int n)
{
int x = list[n-1]
int i;
for (i = n-1; i > 0; i--)
list[i] = list[i-1];
list[0] = x;
}
void rotateleft(int list[], int n)
{
int x = list[0]
int i;
for (i = 1; i < n-1 ; i++)
list[i] = list[i+1];
list[n-1] = x;
}
int main()
{
int list[] = {x1, x2, x3, ... x(n-1),xn}
int i;
int n = sizeof(list);
rotateright(list, n);
rotateleft(list, n);
return 0;
}
Answer:
A. Motherboard has failed.
C. Processor has gone bad or is not seated properly.
Explanation:
The computer system is a digital or electronic device, which comprises of an input device, output device, memory and storage device and a processor, all controlled by a software interface known as the operating system.
The hardware and software components are all integrated on a printed board known as a motherboard.
When the motherboard is faulty, the system looses it functionality and the screen stays off but the power supply indicator light stays on. This is also the same for the processor.