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:
Option(d) is the correct answer to the given question .
Explanation:
The Microsoft word is known as word-processing software.The main purpose of Microsoft word is used creating the text such that we can writing the paragraph or writing the letter to anyone in the Microsoft word .In this software there are many formatting tools are present that making the text effective and attractive .
- Instead of crating the text we cal also creating the table ,charts in the Microsoft word
- The database management software used for management the records its main purpose is not creating the text based document that's why this is incorrect option .
- Spreadsheet software is Microsoft excel that 's primary purpose used to maintain the record in the form of table its main purpose is not creating the text based document that's why this is incorrect option .
- Presentation software is Microsoft PowerPoint that is used for presentation its not main purpose to to create the text-based documents that's why this is incorrect option .
An Output report is known to be the various findings that has been generated or it is said to be the result of a given program outcome.
<h3>What is an output report?</h3>
An output is known to be a file that has been produced by the system when a user is said to have submitted a Program, Report Set, etc. for execution.
Note that to be able to compile the GPSSWorld program, one has to use a statistical software to create the output and charts, and then one can copy and paste the results unto any given word processor software where one can construct a table for it.
Learn more about output reports from
brainly.com/question/11599232
#SPJ1