Write a function titled say_hello() that outputs to the screen "Hello"
★ Modify the function so that it takes an integer argument and says hello a number of times equal to the value passed to it.
★★ Make another function that takes two integers arguments and then returns an integer that is the product of the two integers.
(i.e., integer1: 4, Integer2: 5 returns: 20)
I keep getting this error when I debug the program:
Unhandled exception at 0x77d715de in Fun with Functions.exe: 0xC0000005: Access violation reading location 0xccccccc0.
dang, it doesn't give an error but It just opens and closes the command prompt... Any ideas on why this is? BTW I updated the code above so it shows that i is < x
The first assignment says thet you should write a function that "takes an integer argument and says hello a number of times equal to the value passed to it."
In your example the function takes two arguments and moreover returns a string. So your funcion does not sutisfies the assignment.
And you did not do the second assignment.
I thought sense it wants me to say "hello", the type is a string... The integer argument is int x and the value I picked to be passed is 12 I thought in my main()? Correct me if im wrong! Thanks