Write a c program to find sum of the negative numbers in an array
Answers
Answered by
0
There are two common classes of control action: open loop and closed loop. In an open-loop control system, the control action from the controller is independent of the process variable. An example of this is a central heating boiler controlled only by a timer. The control action is the switching on or off of the boiler. The process variable is the building temperature.This controller operates the heating system for a constant time regardless of the temperature of the building.
Answered by
0
Answer:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,s=0;
for(int i=0;i<10;i++)
{
cout<<"\nEnter any number";
cin>>a[i];
}
for(i=0;i<10;i++)
{
if(a[i]<0)
s=s+a[i];
}
cout<<"\nSum of negative numbers is<<s;
getch();
}
Similar questions