Skip to main content
C++ program that inputs five floating-point values in an array and displays the values in reverse order. Program: #include<iostream> using namespace std; int main() {     float arr[5];     int i, num;     cout<<" How many numbers do you want to Enter: ";     cin>>num;     cout<<" Enter "<<num<<" numbers: ";     for(i=0; i<5; i++)         cin>>arr[i];     cout<<"\nThe Original Array is:\n";     for(i=0; i<5; i++)         cout<<arr[i]<<" ";     cout<<"\n\nThe Reverse of Given Array is:\n";     for(i=(5-1); i>=0; i--)         cout<<arr[i]<<" ";     cout<<endl;     return 0; } Output: ...

C++ program that inputs five floating-point values in an array and displays the values in reverse order.


Program:

#include<iostream>

using namespace std;

int main()

{

    float arr[5];

    int i, num;

    cout<<" How many numbers do you want to Enter: ";

    cin>>num;

    cout<<" Enter "<<num<<" numbers: ";

    for(i=0; i<5; i++)

        cin>>arr[i];

    cout<<"\nThe Original Array is:\n";

    for(i=0; i<5; i++)

        cout<<arr[i]<<" ";

    cout<<"\n\nThe Reverse of Given Array is:\n";

    for(i=(5-1); i>=0; i--)

        cout<<arr[i]<<" ";

    cout<<endl;

    return 0;

}

Output:






Comments

Popular posts from this blog

Tecno: Tecno Mobiles new & latest Model 2020

 Tecno: Tecno Mobiles new & latest Model 2020 Tecno is a Chines mobile phone maker that established back in 2006. For two years, its business has focused on the South Asian market. In a short period,  Tecno Mobiles   has become a threat to major smartphone brands in Pakistan, which is a fantastic success. The main reason people started buying its phones is its mid-range prices. Tecno is giving a competitive edge to many major smartphone brands. Tecno Mobile is a mobile phone brand that's owned by Hong Kong-based Transsion Holdings, which in 2017 launched another mobile brand in India - Itel. Thus, Techno Mobiles was established in 2006. Hence, Techno's latest mobile launch is the Spark 6 Air (64GB). However, The smartphone launched on 21st September 2020. The phone comes with a 7.00-inch touchscreen display with a resolution of 720 pixels by 1640 pixels. The Tecno Spark 6 Air (64GB) powers by a quad-core MediaTek Helio A25 processor and it comes with 3GB of RAM. Th...

Sultan Alauddin Kaiqobad: Sultan Alauddin in Ertugrul

Sultan Alauddin Kaiqobad: Sultan Alauddin in Ertugrul Kaikobad I or Alaud’s Cubad bin Kikwas (Persian: ءعلادین کیقباد بن کیکاوس Turkish Turkish: I. Sultan Alauddin’ s Cubad, 1188–1237) was the Seljuk Sultan of Rama. Who ruled from 1220 to 1237. It extended the Sultanate’s borders at the expense of its neighbors. Especially mangosteen balek and aubergines. And with the presence of Ceylon in the Mediterranean, they captured the port of Cullen Oros. Elijah was later renamed in his honor. The Sultan Alauddin , sometimes styled “Keikoabad Great”, is remembered today for his outstanding architectural legacy. And court culture. Which flourished during his reign. The Seljuq power represented in the Keikobad period. And affected Anatolia. And Keiko itself was considered inhabited. He was the most famous prince of the royal family. During the post-Mongol period in the mid-13th century. Anatolians often see this period as the Golden Age. When the new rulers of Anatolia found out. So they justifie...

SAMSUNG: SAMSUNG Smartphones Latest Model

 SAMSUNG: SAMSUNG Smartphones Latest Model Here you will find all the best. And top-rated mobile phones of the Samsung  brand. Thus, and their respective prices beneath each product. Hence, It is a South Korean electronics manufacturing company based in Suwon, South Korea. However, The company started its journey. By developing electrical and electronic devices. Like calculators, air conditioners, washing machines, televisions, and refrigerators. Thus, They expanded their business. By stepping into the mobile phone market. Since then It became a leading name in the industry. Thus, surpassing the other big names in the market. The product list of Samsung includes the smartphone, LED TV, Laptops, Smartwatch, Washing machines, and many more. Since 2006, Samsung has been the world’s largest mobile phone brand worldwide. However, It has also been a major manufacturer of electronic components. Thus, like lithium-ion batteries, semiconductors, chips, flash memory. And hard dr...