c program for stm32 nucleo true studio | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

c program for stm32 nucleo true studio

Program to match passcode within array 10 digits Output is print Wrong password with when not match And Right password when passcode is wrire

16th Feb 2019, 11:20 PM
Laddi S Sidhu
Laddi S Sidhu - avatar
1 Answer
0
int []userPass = new int [10]; int [] truePass = {1,2,3,4,5,6,7,8,9,0}; bool match = true; for (int i=0; i<pass.length;i++) { if(userPass[i] != truePass[i]) { match = false; break; } } if (match) { console.Write("Right password"); } else { console.Write("Wrong password"); }
18th Nov 2020, 4:57 AM
Sacalivin Obiri
Sacalivin Obiri - avatar