Which programming language are you working in?
Here is how you could achieve this in Python:
establish a counter, starting at 1.
While your counter is 10 or less, do two things:
print the counter,
and increase the counter by 1.
code:
counter = 1
while counter <= 10:
print(counter)
counter = counter + 1
Those last two lines should be indented.
Answer: actually idk this is a hard question when i figure it out ill let you know
Explanation:
so basically he will include the purpose of his email
Answer:
#include <stdio.h>
void printValues ( unsigned char *ptr, int count) // count is no of cells
{
for(int i=0; i<count; i++) {
printf("%d ", ptr[i]);
}
}
int main ( )
{
unsigned char data[ ] = { 9, 8, 7, 5, 3, 2, 1} ;
printValues( data, sizeof(data)/sizeof(data[0]) );
}
Explanation:
Remember that the sizeof() mechanism fails if a pointer to the data is passed to a function. That's why the count variable is needed in the first place.
I believe the answer would be true
Answer:
Explanation:
bool isPalindrome(string str)
{
int length = str.length();
for (int i = 0; i < length / 2; i++) {
if (str [i] != str [length – 1 – i]) {
return false;
}
}
cout << str << "is a palindrome";
return true;
}