#include<iostream>
using namespace std;
void main()
{
int counter=0,temp=0;
float numbers[10];
for(int i=0;i<10;i++)
{
cout<<"Please Enter Value = ";
cin>>numbers[i];
temp=numbers[i];
temp=temp%6;
if(temp==0)
{
counter++;
}
}
cout<<"Total Multiples of 6 = "<<counter<<endl;
system("pause");
}
Output:
using namespace std;
void main()
{
int counter=0,temp=0;
float numbers[10];
for(int i=0;i<10;i++)
{
cout<<"Please Enter Value = ";
cin>>numbers[i];
temp=numbers[i];
temp=temp%6;
if(temp==0)
{
counter++;
}
}
cout<<"Total Multiples of 6 = "<<counter<<endl;
system("pause");
}
Output:
0 Questions:
Post a Comment