Answer:
The code to this question can be given as:
Code:
while ((s!="Y" && s!="y" && s!="N" && s!="n")) //loop for check condition
{
cin >> s; //insert value
}
Explanation:
The description of the following code:
- In this code, we use a string variable s that has been to define in question.
- In code, we use a while loop. It is an entry control loop in loop we check variable s value is not equal to "y", "Y", "n" and "N".
- In the loop we use AND operator that checks all value together. If this is true So, we insert value-form user input in string variable that is "s".
Acest lucru nu este calculator și tehnologie acest lucru arata ca acesta poate fi un poem pare rău, dar acest lucru trebuie postat in categoria engleză!! Mulțumesc
Answer:
Is it a tool in the computer, pls make it clear
Following are the code that is written in c language
#include <stdio.h>
int main() // main function
{
int n1,t; // declaring variable
printf(" Enter an integer :");
scanf("%d",&n1); // taking input
while(n1>0) // iterating over the loop untill the value of n is greater then 0
{
t=n1%10;
printf("%d",t);
printf("\n");
n1=n1/10;
}
return 0;
}
Explanation:
we taking an integer value n1 and iterating over the loop untill n1>0
suppose n1=1234
then t=n%10;
means t=1234%10
as % holds reminder means t=4
then print the value of t means print 4
and n1 becomes 123 which is > 0 again condition is checking and same process is follow untill n1>0
output
Enter an integer: 5213
3
1
2
5