#include<iostream.h>
#include<conio.h>
void main()
{
for(int i=1;i<=10;i++)
{
cout<<i*i;
}
getch();
}
First you will need to have some basic programming knowledge. You can use this to help make the program that is needed.
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
You first learn how to program in C.
first think of the logic and then write the statements
#include<iostream> int main() { int i=0; while(i++<10) std::cout<<i*i<<std::endl; }
First you will need to have some basic programming knowledge. You can use this to help make the program that is needed.
For first find an example program.
int first= 1;
No, it is not possible.
Algorithm: multiples input: two positive integers, m and n output: print first n multiples of m i = m; for j = 1 to n print i i = i + m; next j
public class sum { public static void main(String args[]){ int sum=0; for(int i=1;i<=10;i++){ sum=sum+i; } System.out.println(sum); } }
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
Very interesting !If you write the counting numbers from 1 to 1,000,000,you'll write the digit '9' exactly 600,000times.
You first learn how to program in C.
first think of the logic and then write the statements
#include<iostream> int main() { int i=0; while(i++<10) std::cout<<i*i<<std::endl; }
The sum of the first 20 integers is 190.