| | |
help me in array
![]() |
•
•
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.
I'm here to prove you wrong.
![]() |
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
| Thread Tools | Search this Thread |
#include * adobe ansi api array asterisks binarysearch centimeter changingto char character cm copyimagefile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory dynamic execv feet fgets file fork frequency function getlasterror getlogicaldrivestrin givemetehcodez global grade graphics gtkgcurlcompiling gtkwinlinux hacking highest histogram include incrementoperators infiniteloop input interest kernel keyboard kilometer linked linkedlist linux linuxsegmentationfault list locate logical_drives looping loopinsideloop. lowest match matrix meter microsoft mqqueue number odf opendocumentformat owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing scanf segmentationfault sequential shape single socket socketprograming standard string systemcall threads turboc unix user voidmain() wab whythiscodecausesegmentationfault windows.h windowsapi






