Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(C++) Hello, please answer about this question in C++ please. *Do not use any pointers or dynamic arrays please! A. Write a function that takes

(C++)

Hello, please answer about this question in C++ please.

*Do not use any pointers or dynamic arrays please!

image text in transcribed

A. Write a function that takes as arguments two vectors (ux, uy, ux) and (vx, vy, vz), computes the cross product of those vectors, and stores the result in pass-by-reference parameters (wx, wy, wz). (If you do not remember the formula for the cross product, look it up.) Here each component is of type double, and the components are not grouped as arrays (so each component is a separate parameter) B. Redo Problem A except assume that the parameters are three arrays u, v, and w, each of which are three-element arrays. C. Write a function that takes in a C++-style string s, as well as an integer n, and then returns true if any substring of length n in s repeats itself, and false otherwise. For example, if s is "toe-to-toe" and n is 3, then the function would return true since "toe" occurs twice within s. However, if n were 4 the function would return false. As a second example, if s is "singing" and n is 2, then the function would return true since, e.g., "in" appears more than once (as does "ng"). In this problem you may use any of the C++ string member functions

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

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions