We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b234483 commit 06c3802Copy full SHA for 06c3802
Delete_all_the_odd_numbers.c
@@ -0,0 +1,29 @@
1
+#include <stdio.h>
2
+#include <string.h>
3
+#include <math.h>
4
+#include <stdlib.h>
5
+
6
+int main() {
7
8
+ int n,count=0;
9
+ scanf("%d",&n);
10
+ int a[n];
11
+ for(int i=0;i<n;i++)
12
+ {
13
+ scanf("%d",&a[i]);
14
+ if(a[i]%2==0){
15
+ count++;
16
+ }
17
18
+ int arr[count],j=0;
19
+ for(int i=0;i<n;i++){
20
21
+ arr[j]=a[i];
22
+ j++;
23
24
25
+ for(int j=0;j<count;j++){
26
+ printf("%d ",arr[j]);
27
28
+ return 0;
29
+}
0 commit comments