write a C++ program given below?
Read 2 positive integers from a user, it finds if the smaller (in number of digits)
number is present in the larger number and its indices. For example if user enters
54826827 and 82 then number 82 is present in 5482 at index 2 and 5.
i have tried many different approaches but i dont even know where to start. i am new to c++ programming so if someone can plz help me by writing this code i will be really thankful!!
Comments
Your best bet is to post your attempt and ask people to help you make it work properly. It's unlikely anyone will write the program for you from scratch.
Okay, first off, since you're not treating these integers as integers for this purpose, there's no need to read them in as integers. Instead, why not read them in as character arrays? You can then iterate through the arrays and print out an index whenever you find one.
Post your code.
=
Then people can help you get it the way you want.