#include
#include
void main()
{
char ch;
clrscr();
printf("enter to know ascii value");
scanf("%c",&ch);
printf("%d",ch);
getch();
}
program that display the area of a circle of a reduce
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...
identification division. program-id. greatest. environment division. data division. working-storage section. 77 a pic 999. 77 b pic 999. 77 c pic 999. procedure division. greatest. display "ENTER THE THREE NUMBERS:". accept a. accept b. accept c. if a > b and a > c display a "is greatest" else if b > c display b "is greatest" else display c "is greatest". display " thank you". stop run.
Accept 5 numbers in an array and display it.
ATMs are not designed to accept alpha-numeric PINs. They're programmed to accept a 4-digit numerical code.
Design an algorithm that will accept a perons's name from the screen entered as surname, first name, separated by a comma. Your program is to display the name as frist name, followed by three blanks, followed by the surname. -defining diagram -pseudocode algorithm
The variable, X, has to undergo the following: X*9÷5+32 [The reverse would be to accept a Fahrenheit temperature: (F-32)*5÷9]
//C program to accept a string from user and //display its ascii value and //then display sum of all ascii value of strings #include<stdio.h> #include <string.h> int main() { char String[100]; int Sum,Index; Sum=0; //Sum is initially zero printf("Enter the string:\n"); gets(String); //Accept String from User for(Index=0;Index<strlen(String);Index++) { Sum+=(String[Index]); //Adds (the ASCII values of) the String characters. } printf("The sum is %d\n",Sum); //Printing it as %d gives the equivalent ASCII value. return 0; }
'Acceptable' is an adjective: 'He did not display an acceptable standard of behaviour.'
draw a flowchart to display the first tenth even number
start, inputbox,inputbox,inputbox,inputbox,inputbox,progresh,display,stop
public class PrintOctal { public static void main(String[] args) { int n = Integer.parseInt(args[0]); System.out.printf("%o\n", n); } }