#include<stdio.h>
bool is_digit (char c) {
return (c>='0' && c<='9');
}
bool is_upper (char c) {
return (c>='A' && c<='Z');
}
bool is_lower (char c) {
return (c>='a' && c<='z');
}
int main () {
char input[20];
printf ("Enter a 20 character string containing digits and letters: ");
scanf ("%s", &input); /* beware of buffer overflow */
for (int index=0; index<20; ++index) {
printf ("The character at index %d is ");
if (is_digit (input[index]))
printf ("a digit.\n");
else if (is_upper (input[index]))
printf ("an uppercase letter.\n");
else if (is_lower (input[index])) printf ("a lowercase letter.\n");
else
printf ("a non-alphanumeric character.\n");
}
return 0;
}
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.
//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; }
draw a flowchart to display the first tenth even number
Accept 3 natural numbers and check whether it firms pythagorean triplet
program that display the area of a circle of a reduce
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.
//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; }
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
C programm
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]
The program is here guys.......... //Finding whether the given number is perfect or not //Starts here #include<stdio.h> void main() { int i=1,temp=0,number; scanf("%d",&number); while(i<=number/2){ if(number%i==0) temp+=i; i++; } if(temp==number) printf("Its a perfect number"); else printf("Its not a perfect number"); } //ends here
'Acceptable' is an adjective: 'He did not display an acceptable standard of behaviour.'
That would be up to the owner of the property whether they would accept you as a co-signer.That would be up to the owner of the property whether they would accept you as a co-signer.That would be up to the owner of the property whether they would accept you as a co-signer.That would be up to the owner of the property whether they would accept you as a co-signer.
draw a flowchart to display the first tenth even number
Accept 3 natural numbers and check whether it firms pythagorean triplet