| | |
help me in array
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2008
Posts: 2
Reputation:
Solved Threads: 0
this is question and the answer...but i cannot compile it in dev c++ correctly..help me
//(a) Get five integer numbers from the user.
//( Store the numbers in an array called Number.
//© Display all the numbers on screen.
//(d) Modify the program so that it prints the reverse of the numbers.
//CONTOH OUTPUT :
//Enter numbers : 1
//Enter numbers : 2
//Enter numbers : 3
//Enter numbers : 4
//Enter numbers : 5
//1 2 3 4 5
//5 4 3 2 1
//Press any key to continue
help me to find the wrong
//(a) Get five integer numbers from the user.
//( Store the numbers in an array called Number.
//© Display all the numbers on screen.
//(d) Modify the program so that it prints the reverse of the numbers.
//CONTOH OUTPUT :
//Enter numbers : 1
//Enter numbers : 2
//Enter numbers : 3
//Enter numbers : 4
//Enter numbers : 5
//1 2 3 4 5
//5 4 3 2 1
//Press any key to continue
c Syntax (Toggle Plain Text)
#include<stdio.h> main() { int i,Number[5]; for (i=0; i<5; i++) { printf("Enter Number: "); scanf("%d" ,&Number[i]); } for (i=0; i<5; i++) { printf("%d\t" ,Number[i]); } printf("\n"); for(i=4; i>=0; i--) { printf("%d\t", Number[i]); } }
help me to find the wrong
Last edited by Ancient Dragon; Nov 7th, 2008 at 8:22 pm. Reason: add code tags
"What we repeat defines what we are!!" Aristotle
-->
"looping.. defines Perfomance from O (n) ..up to O(n!)" Sidatra79 :D :D
-->
"looping.. defines Perfomance from O (n) ..up to O(n!)" Sidatra79 :D :D
•
•
Join Date: Nov 2008
Posts: 90
Reputation:
Solved Threads: 8
abov e program can also be written as:
C Syntax (Toggle Plain Text)
void main() { ------ ----- getch(); }
•
•
•
•
abov e program can also be written as:
C Syntax (Toggle Plain Text)
void main() { ------ ----- getch(); }
The only way you could be more completely wrong is to introduce syntax errors into one of the four "this is real code" lines of that example.
New members chased away this month: 5
![]() |
Similar Threads
- Can I ghost a RAID array??? (Windows NT / 2000 / XP)
- Creating dynamic array structures (C++)
- Array limit (C)
- struct dynamic 2d array alloc (C)
- string to integer array transformation (C)
- Array (Visual Basic 4 / 5 / 6)
Other Threads in the C Forum
- Previous Thread: Returning counters to 0 ?
- Next Thread: pointers to function
Views: 472 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays bash binarysearch centimeter char character convert copyanyfile copypdffile createcopyoffile createprocess() csyntax directory drawing dynamic executable feet fflush file floatingpointvalidation fork frequency getlasterror getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling hardware highest homework i/o ide infiniteloop initialization interest intmain() kilometer lazy license linked linkedlist linux linuxsegmentationfault list match matrix meter microsoft multi mysql oddnumber odf open openwebfoundation pattern pause pdf pointer pointers posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition scheduling segmentationfault send shape single socketprogramming spoonfeeding stack standard strchr string strings structures student suggestions system test testautomation unix urboc user visualstudio voidmain() win32 win32api windows.h






