#include <iostream>
#include <new>
#include <conio.h>
using namespace std;
int main ()
{
int i,n;
int * p;
cout << "How many numbers would you like to type? ";
cin >> i;
p= new (nothrow) int[i];
if (i == 0)
cout << "Error: memory could not be allocated";
else
{
for (n=0; n
{
cout << "Enter number: ";
cin >> p[n];
}
cout << "You have entered: ";
for (n=0; n
cout << p[n] << ", ";
delete[] p;
}
getch();
return 0;
}
Artikel yang terkait dengan kategori:
Komentar melalui Facebook:
cara memasang
Facebook Comment?
Langganan:
Posting Komentar
(
Atom
)
boleh copas tapi cantumkan sumber linknya ya ... ^^
My Archive
-
2011
(
18
)
- Desember ( 1 )
- November ( 4 )
- Oktober ( 2 )
- Juni ( 1 )
- Mei ( 3 )
- April ( 1 )
- Maret ( 4 )
- Februari ( 1 )
- Januari ( 1 )
-
2010
(
36
)
- Desember ( 4 )
- November ( 7 )
- Oktober ( 8 )
- September ( 6 )
-
Agustus
(
8
)
- Bluetooth Driver Installer, Bluetooth driver compa...
- Agar Blog Masuk Google Dengan Cepat Kilat
- Agar co.cc dapat diakses tanpa www (redirect)
- Download Soal Lomba Programming GemasTIK 2010
- Membuat program dengan banyak input dynamic memory
- NEED FOR SPEED mobile edition
- Windows Mobile Emulator
- Soal Penyisihan Lomba Programming GeMaTIK 2009
- April ( 1 )
- Februari ( 1 )
- Januari ( 1 )


0 komentar :
Posting Komentar