Click here to Skip to main content
15,868,141 members
Home / Discussions / Mobile
   

Mobile

 
Questionprogramming dart Pin
olivier Dakouri4-Oct-21 8:24
olivier Dakouri4-Oct-21 8:24 
AnswerRe: programming dart Pin
Mycroft Holmes4-Oct-21 12:09
professionalMycroft Holmes4-Oct-21 12:09 
GeneralRe: programming dart Pin
olivier Dakouri4-Oct-21 13:20
olivier Dakouri4-Oct-21 13:20 
QuestionRe: programming dart Pin
Richard MacCutchan4-Oct-21 22:07
mveRichard MacCutchan4-Oct-21 22:07 
AnswerRe: programming dart Pin
olivier Dakouri5-Oct-21 9:15
olivier Dakouri5-Oct-21 9:15 
GeneralRe: programming dart Pin
Richard Deeming5-Oct-21 21:45
mveRichard Deeming5-Oct-21 21:45 
GeneralRe: programming dart Pin
Richard MacCutchan5-Oct-21 21:46
mveRichard MacCutchan5-Oct-21 21:46 
SuggestionRe: programming dart Pin
David Crow5-Oct-21 2:38
David Crow5-Oct-21 2:38 
GeneralRe: programming dart Pin
olivier Dakouri5-Oct-21 9:19
olivier Dakouri5-Oct-21 9:19 
QuestionRe: programming dart Pin
David Crow5-Oct-21 9:35
David Crow5-Oct-21 9:35 
AnswerRe: programming dart Pin
olivier Dakouri12-Oct-21 4:17
olivier Dakouri12-Oct-21 4:17 
GeneralRe: programming dart Pin
Richard MacCutchan12-Oct-21 4:50
mveRichard MacCutchan12-Oct-21 4:50 
GeneralRe: programming dart Pin
olivier Dakouri12-Oct-21 11:52
olivier Dakouri12-Oct-21 11:52 
GeneralRe: programming dart Pin
Richard MacCutchan12-Oct-21 21:54
mveRichard MacCutchan12-Oct-21 21:54 
GeneralRe: programming dart Pin
olivier Dakouri14-Oct-21 7:07
olivier Dakouri14-Oct-21 7:07 
GeneralRe: programming dart Pin
David Crow14-Oct-21 7:49
David Crow14-Oct-21 7:49 
GeneralRe: programming dart Pin
Richard MacCutchan14-Oct-21 21:04
mveRichard MacCutchan14-Oct-21 21:04 
There are a number of things wrong.
1. The nombreElementsPairs function is inside the main function; it should be a separate block.
2. The list of numbers is supposed to be a parameter passed in to the function, but you ignore that and create a new local list.
3. You create the counter nombreElementsPairs but never refer to it again.
4. You test every element of the list to see if it is even, and if it is you set the resultat variable to zero. Note, that you previously initialised resultat to zero, so if all elements of the list are odd, it will still be zero at the end.
5. The return value of the function is resultat which will always be zero, which is not the count of anything.
6. The print statement does nothing useful.

As I already suggested, you should go to the Dart website and work through the tutorials, so you get to understand how to structure your program logically.
GeneralHow to permanently set location for Android 1Weather? Pin
swampwiz18-Jul-21 11:35
swampwiz18-Jul-21 11:35 
QuestionRe: How to permanently set location for Android 1Weather? Pin
David Crow30-Aug-21 2:19
David Crow30-Aug-21 2:19 
QuestionWhy is there a difference between the page style in split view and simulated window (in Xamain)? Pin
Alex Dunlop18-Jun-21 20:03
Alex Dunlop18-Jun-21 20:03 
QuestiondataTable react native Pin
Member 1478297927-Apr-21 22:05
Member 1478297927-Apr-21 22:05 
AnswerRe: dataTable react native Pin
TUF Gaming8-Jun-21 8:58
TUF Gaming8-Jun-21 8:58 
AnswerRe: dataTable react native Pin
Richard Deeming8-Jun-21 21:33
mveRichard Deeming8-Jun-21 21:33 
GeneralRe: dataTable react native Pin
Richard MacCutchan8-Jun-21 21:53
mveRichard MacCutchan8-Jun-21 21:53 
QuestionHow to get data from GSM module to android studio without including the server? Pin
Rocking Kapil21-Mar-21 0:05
Rocking Kapil21-Mar-21 0:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.