#include<stdio.h>
#include<conio.h>
void main(){
int a[100],i,temp,j,n;
printf("\t \n enter the size of the array");
scanf("%d",&n);
printf("\n enter the numbers ");
for(i=0;i<n;i++){
scanf("%d",&a[i]);
}
j=n-1;
for(i=0;i<(n/2);i++){
temp=a[i];
a[i]=a[j];
a[j]=temp;
j--;
}
for(i=0;i<n;i++){
printf("\n %d",a[i]);
}
}
write the javascript code to display the reverse no. of given no. (e.g. 247 reverse of 742)
This is not a question.
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
void main(){int *n,a,r=0;clrscr();printf("enter any no to get its reverse: ");scanf("%d",&*n);while(*n>=1){a=*n%10;r=r*10+a;*n=*n/10;}printf("reverse=%d",r);getch();}Output:enter any no to get its reverse: 456reverse=654
write a c++ program to convert binary number to decimal number by using while statement
Reference:cprogramming-bd.com/c_page2.aspx# reverse number
write the javascript code to display the reverse no. of given no. (e.g. 247 reverse of 742)
In python, type the following into a document. NOTE: Sentences following a # symbol are comments, and are not necessary for the program to run. #!/usr/bin/python #This program takes a input from a user and reverses it. number = input("Type a number: ") #This takes input from a user. a = len(number) #This finds the length of the number reverse = "" #This sets the variable reverse to an empty string. for i in number: a = a-1 #The places in a string start from 0. The last value will be the length minus 1.reverse = reverse + number[a] #Makes the number's last digit the new string's first. print("The reverse of", number, "is", reverse + ".") #prints the resulting string. This program will take any sequence of characters and reverse them. The final value is a string, but if an integer is needed, one needs only to add the line reverse = int(reverse) above the print statement. However, this will stop the program from being able to reverse strings, as it is not possible to convert a string to an integer if it is not a number.
To check if a number is a palindrome, reverse the number and see if it is equal to the original number. If so, the number is a palindrome, otherwise it is not. To reverse a number, use the following function: int reverse(int num, int base=10) { int reverse=0; while( num ) { reverse*=base; reverse+=num%base; num/=base; } return(reverse); }
i am sam
abdulrahman
This is not a question.
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
question clarity
Certainly, you can write a program without main, but you cannot build an executable from it, if that is okay with you.
Write a program to convert a 2-digit BCD number into hexadecimal
mano ni anda yarrr