#include<iostream>
#include<iomanip>
using namespace std;
void main()
{
int counter=0;
double numbers[10];
for(int i=0;i<10;i++)
{
cout<<"Please Enter Value = ";
cin>>numbers[i];
if(numbers[i]<0)
{
counter++;
}
}
cout<<"Total Negtive Numbers Are = "<<counter<<endl;
system("pause");
}
#include<iomanip>
using namespace std;
void main()
{
int counter=0;
double numbers[10];
for(int i=0;i<10;i++)
{
cout<<"Please Enter Value = ";
cin>>numbers[i];
if(numbers[i]<0)
{
counter++;
}
}
cout<<"Total Negtive Numbers Are = "<<counter<<endl;
system("pause");
}
Output:
0 Questions:
Post a Comment