| | |
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 |
* ansi array asterisks binarysearch calculate changingto char character cm convert copyanyfile copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createprocess() database feet fflush fgets file floatingpointvalidation fork forloop givemetehcodez global grade graphics gtkwinlinux hacking histogram homework i/o inches infiniteloop input interest intmain() iso kernel keyboard kilometer km linked linkedlist linux locate looping loopinsideloop. lowest match meter microsoft mqqueue number oddnumber odf open opendocumentformat openwebfoundation owf pattern pdf performance posix power probleminc process program programming pyramidusingturboccodes radix read recv recvblocked research reversing scanf segmentationfault sequential single socket socketprograming socketprogramming standard string suggestions systemcall threads turboc unix urboc user variable voidmain() wab whythiscodecausesegmentationfault win32api windowsapi






