Tuesday 10 March 2020

CPP program to find half of the numbers that is put in a float array

Source Code:
#include<iostream>
using namespace std;
int main()
{
float a[10];
int i;
cout<<"Enter the numbers: ";
for(i=0;i<10;i++)
{
cin>>a[i];
}

cout<<"The numbers are: ";
for(i=0;i<10;i++)
{
cout<<(a[i])/2;
}

return 0;

}


Program Output :

No comments:

Post a Comment