/*Program to find Armstrong number between 1 to N*/
int main() {
int n = 0, remainder, sum = 0, i = 0, noDigits = 0, isArm = 0;
char ch[60] = {0};
printf("Find the Arm Strong Numbers between 1 to N");
scanf("%d", &n);
for(i = 1; i<n; i++)
{
isArm = i;
itoa(isArm, ch, 10);
noDigits = strlen(ch);
while(isArm)
{
remainder = isArm%10;
isArm=isArm/10;
sum= sum+pow(remainder, noDigits);
}
if(sum == i)
printf("\nArm Strong Nos are %d\n", i);
sum = noDigits = 0;
}
}
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.
#include
PRINT 2,3,5,7,11,13,17,19,23,29,31,37
you do this 10 print "0112358132134" use the whole of the thing
find even number in array
You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.
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.
Write a c program to print the 100 to 1 nos
for (int i = 2; i < 10; i ++) printf("%d\n", i); You did say even and odd numbers between 1 and 10. That's allnumbers between 1 and 10.
how do we use loops in c plus plus programing and what are basic differences between do,for and while loop
#include
PRINT 2,3,5,7,11,13,17,19,23,29,31,37
Try the triangle program on a search engine. Replace numbers with stars and that should do the trick
Install your phone software program and download the list to your PC then print. Your phone program can be downloaded from your phone maker web site if it did not come with your phone package.
Oh, what a lovely request! In FoxPro, you can create a program to print all prime numbers from 1 to 100 by using a loop to check each number for divisibility only by 1 and itself. If it meets this criteria, you can print it out on the screen. Remember, every number is unique and special, just like a happy little tree in a vast forest.
you do this 10 print "0112358132134" use the whole of the thing
find even number in array