Hello, Good Works mate!
Answer: B) -2
*The result will be negative.
Kind Regards
Answer:
Program is in C++
Explanation:
C++ Code:
#include <iostream>
#include <cctype>
using namespace std;
int main(){
char ch;
do{
cout<<"Enter Character: ";
cin>>ch;
if (isupper(ch)){
cout<<"OK"<<"\n";
}
}
while(ch!='!');
return 0;
}
_______________________________________
Code Explanation
First execute a do while loop as we want user to enter at least first character to check whether its upper case or not. If user enters exclamation character then this loop will terminate along with the program.
To check whether the entered character is upper case or not we will be using isupper(ch) method defined in cctype library.
If the character is upper case then if condition will show Ok by printing it using cout and this program will show nothing if the character is not upper case.
Sample Output
Enter Character: A
OK
Enter Character: b
Enter Character: c
Enter Character: d
Enter Character: E
OK
Enter Character: G
OK
Enter Character: F
OK
Enter Character: !
Not a Question so how am i supposed to help with this problem
Answer:
rs 35.6ko vrs 12. r7 3.3ko vrt 13.
Created a new multilevel list style to add to the gallery