Site icon Tutor Bin

University of Central Missouri C++ Programming Language Project

University of Central Missouri C++ Programming Language Project

Description

1) Indicate if the following identifiers are valid or invalid. If invalid then state why!

a)99agent

b)agent99

c)agent??

d)??agent

e)agent 99

f)agent_99

2)State if the following are invalid, true or false assuming num1=10, num2=5, num3=15

a.(Num1>=num2) || (num1<=num3)

b.Num1>=num2 && num3<num2

c.Num1<num2<num3

d.! (Num1=num2) AND (num1=num2+5)

e.!(num2<>num3)

f.Num1= 5 || 6

3)Write a program to input 10 numbers and to sum them up. The program should print “ok” if the sum is positive, and “not ok” if the sum is negative (or 0). Use a WHILE loop as appropriate. Then write a program using a FOR loop.

4)Write a program that would enter and multiply all inputted integers. The program must terminate when the user enters the first number 0. The program must also count how many numbers have been inputted. Test your program (dry-run) on the input 2,3,-2,4,0. The program must output -48 and 4.

5)Write the logic for a program that reads in character after character until the user enters the exclamation point ‘!’. The program should print the total number of characters entered, the total number of spaces entered ‘ ‘, and the number of times the letter ‘e’ was entered. You must use a while loop!

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Exit mobile version