Learn C ProgrammingLearn ProgrammingPrograms On Decision Control StructuresResources 019. Write a program to accept a number from user and print if it is multiple of 7 in C language #include<stdio.h> #include<conio.h> main() { int n; clrscr(); printf("Enter number..."); scanf("%d",&n); if(n%7==0) printf("Number is multiple of…Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On Decision Control StructuresResources 018. Write a program to accept a number from user and print if it is divisible by 5 in C language #include<stdio.h> #include<conio.h> main() { int n; clrscr(); printf("Enter number..."); scanf("%d",&n); if(n%5==0) printf("Number is divisible by…Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On Decision Control StructuresResources 017. Write a program to accept a number from user and print if it is even or odd in C language #include<stdio.h> #include<conio.h> main() { int n; clrscr(); printf("Enter number..."); scanf("%d",&n); if(n%2==0) printf("Number is even..."); else…Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On Decision Control StructuresResources 016. Write a program to accept a number and check if it is >10, <10 or =10 in C language #include<stdio.h> #include<conio.h> main() { int n; clrscr(); printf("enter number..."); scanf("%d",&n); if(n>10) printf("Number is greater than…Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On Decision Control StructuresResources 015. Write a program to accept a number and print if the number is Positive/Negative in C language #include<stdio.h> #include<conio.h> main() { int n; clrscr(); printf("Enter number.."); scanf("%d",&n); if(n>0) printf("Given number is positive");…Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On Decision Control StructuresResources 014. Write a program to accept two number and print largest among them in C language #include<stdio.h> #include<conio.h> main() { int a,b; clrscr(); printf("Enter numbers : "); scanf("%d%d",&a,&b); if(a>b) printf("Largest value…Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On Escape SequencesResources 013. Print the following output in C Language #include<stdio.h> #include<conio.h> main() { clrscr(); printf("\n"); printf(" /\\ \n"); printf(" //\\\\ \n"); printf(" ///\\\\\\ \n");…Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On Escape SequencesResources 012. Print following outputs: http:\\www.kodegod.com\new in C language #include<stdio.h> #include<conio.h> main() { clrscr(); printf("http:\\\\www.kodegod.com\\learn-programming"); getch(); }Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On Arithmetic OperatorsResources 011. Write a program to accept roll no and marks of 3 subjects of a student, Calculate total of 3 subjects and average in C language #include<stdio.h> #include<conio.h> main() { int roll_no,m1,m2,m3,total; float average; clrscr(); printf("Enter roll number : "); scanf("%d",&roll_no);…Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On Arithmetic OperatorsResources 010. Write a program to accept two values a & b and interchange their values in C language #include<stdio.h> #include<conio.h> main() { int a, b, temp; clrscr(); printf("Enter Numbers: "); scanf("%d%d",&a,&b); printf("\nBefore Swapping..\na=%d,b=%d",a,b);…Prashant ChaudhariSeptember 18, 2012