Thanks for the points lol have a good day or night
Answer:
Check the explanation
Explanation:
use `my_guitar_shop`;
#delete the procedure test if it exists.
DROP PROCEDURE IF EXISTS test;
DELIMITER //
CREATE PROCEDURE test ()
BEGIN
#declare variable sqlerr to store if there is an sql exception
declare sqlerr tinyint default false;
#declare variable handler to flag when duplicate value is inserted
declare continue handler for 1062 set sqlerr = TRUE;
#start transaction
start transaction;
delete from order_items where order_id in
(select order_id from orders where customer_id=6);
delete from orders where customer_id=6;
delete from addresses where customer_id=6;
delete from customers where customer_id=6;
if sqlerr=FALSE then
commit;
select 'Transaction Committed' as msg;
else
rollback;
select 'Transaction rollbacked' as msg;
end if;
end //
delimiter ;
call test();
Answer:
The solution code is as follows:
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int main()
- {
- ifstream data;
- float number;
- float sum = 0;
-
- data.open("numbers.txt");
-
- while (data >> number) {
- sum = sum + number;
- }
- cout<<sum;
- return 0;
- }
Explanation:
Firstly, we create a ifstream object, <em>data</em> (Line 9). Then we can use the ifstream object to open the "numbers.txt" (Line 13) and use while loop to traverse through the number in the text file line by line (Line 15). White the loop is ongoing the number in each line is read by >> operator in a similar way to cin and then add each read number to sum variable (Line 16).
At last, display the output (Line 18).
Cars, telephones, Tvs, Microwaves, Furbys
WiFi adaptors, LED lights, Fish finders, GPS units
Answer:
There are many different types of options we can use to print our presentation slides are as follows:
- We can print the entire slide of the presentation and it is provide the whole detail of our presentation together.
- We can also printing the selected parts in the slides that is necessary and important for us and save as short notes.
- We can print various types of presentation handouts for the distribution purpose to the audience.