#include
#include
void main()
{
int n;
void print(int n);
clrscr();
printf("Enter the number:");
scanf("%d",&n);
print(n);
getch();
}
void print(int n)
{
int i;
for(i=1;i<=10;i++)
{
if(n%2!=0)
n+=2;
else
n+=1;
printf("%2d.%2d\n",i,n);
}
}
Output:
Enter the number:5
1. 7
2. 9
3.11
4.13
5.15
6.17
7.19
8.21
9.23
10.25
Enter the number:4
1. 5
2. 7
3. 9
4.11
5.13
6.15
7.17
8.19
9.21
10.23
write a c program to accept a number and generate a square root cube and exponential values
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.
The number of function is Geometry
They vary according to each operating system and each program. Consult the help center of your operating system to see their functions.
if you have a number and on the function machine they're is for example '+1' and your starting number is 4 then you will receive the number 5, that is what a function machine does:-)
a=153 a=n%10;
Excel can display the year as a number. You can get it to display in different ways as part of a full date, such as having 2 or 4 digits to represent it. There is also a YEAR function, to extract just the year from a full date, which is then displayed as a number.
The scanf() function is a commonly used function to input information during the execution of a program. scanf() function has its prototype in the stdio.h header file. To accept and display a number: int num; printf("Enter a number: "); scanf("%d",&num); printf("You entered %d",num); To accept and display a character, replace %d with %c and make num a character variable [char]. Plus: gets, fgets, read, fread, getchar, getc, fgetc, getch...
write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program
write a c program to accept a number and generate a square root cube and exponential values
It somehow tells the compiler that the function will accept an unknown number of parameters.
stdarg.h
This is not a question.
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.
C programm
Use text-editor notepad++
Prototyping is done (at least in C/C++) to declare a function and tell the compiler how to use it before the int main(void) part of the program is run. The function is declared after main and is usually done as a style thing. example int function(int); int main(void) { int anumber = 1; x = function(anumber); return 0; } int function(int number) { //do something return number; } et cetera et cetera...