I'm currently having an assignment that wants me to copy a select amount of files. More specifically files that are even using the cp command. The assignment is to copy files that start with cp and are even. This was my command at first `cp[24680]*` but it returned all files that had an even number in it. I just want files that end in the even number. example I want to copy only these files: cp1250.enc cp1256.enc cp852.enc cp864.enc cp932.enc cp1252.enc cp1258.enc cp860.enc cp866.enc cp936.enc cp1254.enc cp850.enc cp862.enc cp874.enc cp950.enc. But the command I make gives me : cp437.enc cp852.enc …

Member Avatar
Member Avatar
+0 forum 2

I am trying to generate a program using the builtin Random and generate an algorithm that determines whether the number is odd or even. I need to write a program that generates 100 random numbers, determine if its even or odd and finally count the number of even and odd. I am new to Python. This is what I have thus far, but nothin is working. Could someone give me a push in the right direction?? Thank you so much. import random def main(): # explain program intro() # get a random number number = random.randint(1,100) # generate Boonlean variables …

Member Avatar
Member Avatar
+0 forum 8

this is my code, when even i run it it tells me that the number is even while it is odd. #include<stdio.h> #include<stdlib.h> int main(void) { int value; /* To read a number and say wheither it is even or odd*/ printf("Please enter any number \n"); scanf("%u", &value); if (value/2 != 0) printf("the number is Even \n"); else printf("the number is Odd \n "); printf("The value is %u \n",value*10); return 0; } please help me out in getting the code to work in the right way that i want it to.

Member Avatar
Member Avatar
+0 forum 1

I have no idea how it will be created plz help me as long experience I have forgotten due to my illness. Write a program to determine if the digits in a three digit number are all odd, all even, or mixed odd and even. Your program should prompt the user to input a three digit number. If the digits in the three number are all odd, write “ the number contains all odd digits”, if the digits are all even, write “the number contains all even digits”, if the number contains both even and add digits then print : …

Member Avatar
Member Avatar
+0 forum 4

How to display odd and even numbers from a queue link list? hello everyone i really need some help right now on this program. what this program is supposed to do is copy 11 22 44 77 33 99 66 into a linked list that behaves like a queue. the program should display the queue, display the odd numbers, display the even numbers. display queue should look like this 11 22 44 77 33 99 66 display odd numbers should look like this 11 77 33 99 display even numbers should look like this 22 44 66 so far i …

Member Avatar
Member Avatar
+0 forum 3

I need to design an application that determines and prints the number of odd, even, and zero digits in an integer value read from the keyboard. This is what I have so far. public static void main (String[] args) { int odd=0, even=0, zero=0; Scanner scan = new Scanner(System.in); int num = scan.nextInt(); String numS = Integer.toString(num); int digits = numS.length(); for (int i = 0; i < digits; i++) { if (numS.indexOf(i) == 0) { zero++; } else if (numS.indexOf(i) % 2 == 0) { even++; } else { odd++; } } System.out.println("The number of odd digits are: " …

Member Avatar
Member Avatar
+0 forum 3

Can some one help me with my programming project, it is supposed to loop. If the number is even output comes out even and vise-versa. Can someone please tell me what is wrong with my code. Errors "3 errors found: File: C:\Users\Kaamil\evenodd test.java [line: 1] Error: The public type NumberEvaluator must be defined in its own file File: C:\Users\Kaamil\evenodd test.java [line: 3] Error: Duplicate method evenOdd(int) in type NumberEvaluator File: C:\Users\Kaamil\evenodd test.java [line: 8] Error: Duplicate method evenOdd(int) in type NumberEvaluator" Code. public class NumberEvaluator { public void evenOdd(int num) { } public void evenOdd(int num) { if (num % …

Member Avatar
Member Avatar
+0 forum 17

The End.