Want this question answered?
Write a program to count the number of IS in any number in register B and put the count in R5.
A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.
#include "stdio.h" #include "conio.h" #define TABLE_UP_TO_20 20 void table_of_a_number(int number); int main() { int i = 0x00; printf("Enter a positive number in decimal whose table has to be generated"); scanf("%d",&i); table_of_a_number(i); return 0; } void table_of_a_number(int number) { int count = 0x00; for(count = 0x01;count <=TABLE_UP_TO_20 ;count++) { /* THis will print the table*/ printf(" %d * %d = %d\n", number,count, (number*count)); }
#include "stdio.h" int main() { unsigned int number, count; printf("Enter the Number \t"); scanf("%d", &number); printf("The even numbers are: \n"); for(count = 0x01; (count < number && number!= 0x00)) { if(count%2) { }else { printf("%d\n", count); } count++; } return 0; }
I would use a loop like this: const char *p= str-1; size_t count= 0; while (*++p) if (islower (*p)) ++count;
int count_whitespace (FILE* input) { int c, count=0; while (( c = getc(input) ) != EOF ) if ((char) c==' ') ++count; return count; }
int i; for (i=1; i<=10; i++) printf ("%d %d\n", i, i*i);
in linux wc -l filename will count the lines and wc will count the letters
//program to find the factorial value f any number using while loop #include<stdio.h> void main() { int i,n,fact=1; printf("Enter the number\n"); scanf("%d",&n); i=n; while (i>=1) { fact=fact*i; i--; } printf("The factorial value=%d",fact); } the above is a program for calculating tha factorial value of any number which is entered by the user
there could be a part in it like this: int num, digit; int count [10]; do { digit = num%10; num != 10; ++count[digit]; } while (num);
To write repeated multiplication in an exponential notation, you should write the number that has to be multiplied as the base. Count the number of times that the number is used.
yyu5uty