ഇങ്ങോട്ട് നോക്കു

വഴി തെറ്റി വന്നവര്‍

Powered By Blogger

Google Profile

My photo
KAYAMKULAM, KERALA, India
Hi, I’m Renjith Krishnan, a tech enthusiast from Kayamkulam (India), and this my personal page. I write some technological contents , just the things that interested me during the daily life and some automated updates pulled from other sites . If you were looking for my site ,and wanna read some tech stuffs then please go here www.renjith007.co.cc I update my status on twitter [@renjith0007], orkut [@renjith krishnan], FB [@renjith krishnan], some times in skype [@kichuse1] and if you like my stuffs,add me to your network. It’s exciting to meet new people.

വിളികുവോ ആവൊ

Skype Me™!

* * എല്ലാവര്‍ക്കും എന്‍റെ ബ്ലോഗിലേക് സ്വാഗതം * *

Printing array in reverse!

#include <iostream>
using namespace std;

int main()

{
//--- Declare array and number of elements in it.
float a[10];
int n; // Number of values currenlty in array.
{
//--- Read numbers into an array
for (i = 0; i < 10; i++)
cout << "Enter a number: " << cin << a[n];
}

//--- Print array in reverse order
for (int i=n-1; i>=0; i--)
{
cout << a[i] << endl;
}

return 0;
}



----------------------------------------------------------------------------------
#include<iostream.h>
#include<conio.h>
#define MAX 10 /* Declare as Macro */

void main(void)
{
float a[10];
int i;
clrscr(); /* To clear the Screen */

for(i=0;i<MAX;i++)
{
cout <<"\n Enter"<<i+1<<" Number ";
cin >>a[i];
}

//DISPLAY THE ARRAY IN REVERSE ORDER

for(i=MAX;i>=0;i--)
{
cout <<"\n"<<a[i]<<"\n";
}

getch();
}

0 comments:

തിരയുക

എന്നോട് കൂട്ട് കൂടാമോ ?

വിരുന്നുവന്നവര്‍