Thursday, 16 October 2014

Write a program that reads 15 double values from a user into an array and prints the floor of each

Leave a Comment


/*1.    Write a program that reads 15 double values from a user into an array and prints the floor of each*/
#include<iostream>
#include<iomanip>
using namespace std;
void main()
{
    int counter=1;
    double numbers[15]={0};
    for(int i=0;i<15;i++)
        {
            cout<<"Please Enter Value "<<counter++<<" = ";
            cin>>numbers[i];
        }
    system("cls");
        for(int b=0;b<15;b++)
            {
            cout<<"The index "<<b<<" in the array = "<<numbers[b]<<endl;
            }
        system("pause");
}

Output :-

If You Enjoyed This, Take 5 Seconds To Share It