Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve these three codes without using BUILT IN FUNCTIONS AND STRINGS..... USE and ... Programming Fundamentals Assignment #04 Section T Due Date: 05-01-2021 Question 1:

image text in transcribed

Solve these three codes without using BUILT IN FUNCTIONS AND STRINGS.....

USE and ...

Programming Fundamentals Assignment #04 Section T Due Date: 05-01-2021 Question 1: Write a program in C++ that reads 10 from a file into an array(dynamically created) and shifts all even numbers ascending order to the left and odd numbers in descending order to the right side. Sample Output: data.txt: 142 3 15 1 82 8 9 10 21 55 12 14 16 18 Updated Data:2 8 10 14 82 21 15 9 31 Question 2: Write a program in C++ that reads data from a file (ask user to enter file name) into a dynamically growing array until user enters 0. Separate 1-digit and 2-digit numbers from data and store them in separate arrays. Sample Output: Data.txt: 23 15 1 82 8 9 10 21 55 12 14 16 18 One-digit: 2 3 189 Two-digit: 15 82 10 21 55 12 14 16 18 Question 03: Write a C++ program that reads data from file "data.txt" into a char array(). Make a function length() that calculates the length of word. If the length is even, call a function Even() that store the length in a dynamically growing array. If the length is odd, call a function odd() that saves the length in a dynamically growing array. Print the total words of even and odd length on screen Sample Output: Data.txt: This is my assignment number four of programming Fundamentals Words with even length: 8 Words with odd length: 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions