Docsity

code of c programming, Cheat Sheet of Computer Science

Toggle sidebar
bg1
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr(); // clear screen (Turbo C++ specific)
int a[10], i;
cout << "Enter 10 numbers:\n";
for (i = 0; i < 10; i++)
{
cin >> a[i];
}
cout << "\nYou entered:\n";
for (i = 0; i < 10; i++)
{
cout << "a[" << i << "] = " << a[i] << "\n";
}
getch(); // wait for key press before exit
}

Partial preview of the text

Download code of c programming and more Cheat Sheet Computer Science in PDF only on Docsity!

#include <iostream.h> #include <conio.h> void main() { clrscr(); // clear screen (Turbo C++ specific) int a[10], i; cout << "Enter 10 numbers:\n"; for (i = 0; i < 10; i++) { cin >> a[i]; } cout << "\nYou entered:\n"; for (i = 0; i < 10; i++) { cout << "a[" << i << "] = " << a[i] << "\n"; } getch(); // wait for key press before exit }