Try looking at this site, <span>www.c-sharpcorner.com/article/working-with-arrays-in-C-Sharp/</span>
Credit cards do charge the most interest
Answer:
#include <stdio.h> // header file inclusion
int main() // main function declaration
{
int number,product=0; // variable declaration
while(product<100) // while loop
{
scanf("%d",&number); // input a number
product= number*10; // multiply the number by product
printf("%d\n",product); // print the value of product
}
return 0; // return statement
}
Output:
- If the user enter 10 then the loop terminates for the first time and the output is 100.
- If the user enter 5,10 then the loop executes in 2 times and the output is 50 and 100.
Explanation:
- Firstly there is an inclusion of header file which understands the meaning of printf() and scanf() function.
- Then there is the main() function definition
- Then we declare a two-variable (number and product) of integer type.
- Then we define a while loop and check the condition that product value is less than 100 or not.
- Then we take input and multiply by 10.
- Then we assign the value in the product and print the product value.