|
#1
|
||||
|
||||
|
Hi, below i created some Pseudocode for a program i am writing in C. Could some please have a look at it and provide feedback whether the loop will work? Thanks
Code:
CHARACTER name [1..20] INTEGER iso 0 CHARACTER aperture 0 CHARACTER menuNo 0 FLOAT exposureTime 0 Output ‘Exposure Time Calculator’ Repeat Output ‘MENU............................................’ Input menuNo If menuNo = 1 then Output ‘Please enter your name’, name Input name Else if menuNo =2 then Output ‘Please enter the ISO number’, iso Input iso If iso != 6 || iso != 8 || iso != 10 || iso != 12 || iso != 16 || iso != 20 || iso != 25 || iso != 32 || iso != 40 || iso != 50 || iso != 64 || iso != 80 || iso != 100 || iso != 125 || iso != 160 || iso != 200 || iso != 250 || iso != 320 || iso != 400 || iso != 500 || iso != 640 || iso != 800 || iso != 1000 || iso != 1250 || iso !=1600 || iso != 2000 || iso != 2500 || iso != 3200 || iso != 4000 || iso != 5000 || iso != 6400 the Output ‘Error in ISO value’ Iso 0 Else if menuNo = 3 then Output ‘Please enter your aperture value’, aperture Input aperture If aperture != f1.2 || aperture != f1.4 || aperture != f1.8 || aperture != f2 || aperture != f2.8 || aperture != f4 || aperture != f5.6 || aperture != f8 || aperture != f11 || aperture != f16 || aperture != f22 || aperture != f1.432 then Output ‘Error in aperture value’ Aperture 0 Else if menuNo = ? then Output ‘welcome to the help menu’ Else if menuNo = Q then Program ends Endif Until iso != 0 and aperture != 0
__________________
"As much as we have progressed in science, we are still finite creatures with limited conceptual abilities and imperfect observational tools" - James Sweitzer
You'll Never Walk Alone - Liverpool FC |
|
#2
|
||||
|
||||
|
should work
aperture should be a char array or a float iso needs to be put through a string to int converter
__________________
Starcraft II is coming AMD Athlon 4000+ @ 2.9GHz Asus A8NSLI Deluxe LeadTek nVidia Geforce 9600GT 512MB 2GB DDR400 Its an Alienware http://www.chingy1788.co.nr/ Last edited by cHiNgY1788; September 15th, 2007 at 04:02 PM. |
|
#3
|
||||
|
||||
|
aperture yes will be a char array.
but why should iso be put through the converter? its a int value??
__________________
"As much as we have progressed in science, we are still finite creatures with limited conceptual abilities and imperfect observational tools" - James Sweitzer
You'll Never Walk Alone - Liverpool FC Last edited by philmetz; September 15th, 2007 at 10:14 PM. |
|
#4
|
||||
|
||||
|
my if statement in aperture and ISO.
i dont need an else for that right? if i dont need one i dont need to put one? thanks
__________________
"As much as we have progressed in science, we are still finite creatures with limited conceptual abilities and imperfect observational tools" - James Sweitzer
You'll Never Walk Alone - Liverpool FC |
![]() |
| Bookmarks |
«
Previous Topic
|
Next Topic
»
| Topic Tools | |
|
|
All times are GMT +1. The time now is 02:54 AM.
[
RSS ]








