Your question is not clear but i can write a program to find the sum of n natural numbers.
#include<iostream.h>
#include<conio.h>
int main()
{
long int res=0;
int last;
cout<<"enter the last number.";
cin>>last;
for(int i=0;i<=last;i++)
res=res+i;
cout<<"Result is "<<res<<endl;
return 0;
}
No.
Write a function that implements an algorithm that checks to see if a particular integer is prime (returning a boolean). Write a program that uses that function on each number from 1 to 100, and if true, displays that number.
Start accept 7 number calculate sum print sum stop
In Java, the relevant lines would be something like this: for (int number = 1; number <= 10; number++) System.out.println(number, number*number, number*number*number);
36/1, 72/2, .36*10^2, 36*1, 18*2, 6*6
A C++ program can be used to write C programs that will display 10 lines of biodata. Many types of C programming can be written with a C++ program.
No.
write a program to display your name age class schoolname e-mail 2hobby based on choice
Write a program which takes any number of days from the user. the program should display the number of years, number of months formed by these days as well as the remaining days.
to report an answer with the correct number of significant figures, you may need to write significant zeros after the calculator number.
seq 1 2 99
Avogadro's number is a constant. Therefore only one number is equal to Avogadro's number.
A programmer can write programs in C, but C can't write anything by itself.
Example Code#include#includeunsigned input_num (){unsigned num = 0;while (1){std::cout > num)break;std::cout
You mean the calculators should write the programs? Well, they couldn't.
Simply use a for loop (i) that runs from 2 to N-1. Checking if N % i 0 then its a prime number.
Find your own answers....sucks mahn