Answer:
I think the answer is to translate messages from one machine’s programming language into another
Explanation:
Answer:
#include <stdio.h>
#include <string.h>
int main(){
char number[100];
printf("Number: ");
scanf("%s", number);
int sum = 0;
for(int i =0;i<strlen(number);i++){
sum+= number[i] - '0';
}
printf("Sum: %d",sum);
return 0;
}
Explanation:
This declares a c string of 100 characters
char number[100];
This prompts user for input
printf("Number: ");
This gets user input
scanf("%s", number);
This initializes sum to 0
int sum = 0;
This iterates through the input string
for(int i =0;i<strlen(number);i++){
This adds individual digits
sum+= number[i] - '0';
}
This prints the calculated sum
printf("Sum: %d",sum);
return 0;
Answer:001101110010010100011011010110010011100100100000001100100100110001000010001101100100010100100000001101100100100001010001010101001101001010
Explanation:
i copied
After looking at your question, I reasoned you were writing this in python. Here's my code, I hope it helps!
while True:
v1 = input("Enter value of first variable (T/F) ")
v2 = input("Enter value of second variable (T/F) ")
v3 = input("Enter value of third variable (T/F) ")
print("v1: {}, v2: {}, v3: {} = T".format(v1, v2, v3) if v1 == "T" and v2 == "T" or v1 == "T" and v3 == "T" else "v1: {}, v2: {}, v3: {} = F".format(v1, v2, v3))
The raw materials of photosynthesis, water and carbon dioxide, enter the cells of the leaf, and the products of photosynthesis, sugar and oxygen, leave the leaf.