Displays a message that indicates whether the values


Write a program segment that computes 1 + 2 + 3 + ... + (n - 1) + n ,where n is a data value. Follow the loop body with an if statement that compares this value to (n * (n + 1)) / 2 and displays a message that indicates whether the values are the same or different. What message do you think will be displayed? 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Displays a message that indicates whether the values
Reference No:- TGS090313

Expected delivery within 24 Hours