#include
using std::cin;
using std::cout;
using std::endl;
int main()
{
string myNumber = "0";
cout << endl << "Enter a 6-digit number: ";
cin >> myNumber;
cout << endl << "You've entered: " << myNumber << endl;
for (int i = 0; i < myNumber/myNumber[0]; i++)
{
cout << endl << (i + 1) << " element is " << myNumber[i];
}
cout << endl;
system("PAUSE");
return 0;
}
write a program to print the series 1/12+1/22+.........+1/n2 ?
Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.
One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.
If you have the series stored in an array, you loop through the array and print each array element in turn. Another possibility is to print out the numbers in the series as you generate them. In that case, you may not need to store anything (depending on the series, of course).
How to write a program for secant method by mathematica
no thanks
write a program to print the series 1/12+1/22+.........+1/n2 ?
Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.
Please do.
Exactly what do you mean by 'C program in Java'
Writing a program for a sum of sine series requires a rather long formula. That formula is: #include #include #include main() { int i,n,x; .
you write 85 thousand in digits is like this Eighty- five -thousand
You write eighty one thousand in digits by doing 81,000.
digits
Reference:cprogramming-bd.com/c_page2.aspx# sum the series
#include <stdio.h> int main(int argc, char **argv) { if (argc<1) { printf("Usage: %s number\n",argv[0]); return -1; } int digits=1, i=atoi(argv[1]); while (i/=10) ++digits; printf("%d\n",digits); }
Write the digits in such a way that there are six digits to the right of the number of millions, and three digits to the right of the thousands. Fill out missing digits with zeros.