Sum of Natural Numbers in C-Programming
FOR LOOP #include <stdio.h> int main() { int n, i, sum = 0; printf("Enter a positive integer: "); scanf("%d",&n); for(i=1; i <= n; ++i) { sum += i; // sum …
Sum of Natural Numbers in C-Programming Read MoreFOR LOOP #include <stdio.h> int main() { int n, i, sum = 0; printf("Enter a positive integer: "); scanf("%d",&n); for(i=1; i <= n; ++i) { sum += i; // sum …
Sum of Natural Numbers in C-Programming Read More//Even or Odd #include <stdio.h> int main() { int number; printf("Enter an integer: "); scanf("%d", &number); // True if the number is perfectly divisible by 2 if(number % 2 == …
Even or Odd in C program Read MoreCLASS 12 NOTES- COMMING SOON
CLASS 12 NOTES- COMMING SOON Read More//Positive , Negative or Zero #include <stdio.h> int main() { double number; printf("Enter a number: "); scanf("%lf", &number); if (number <= 0.0) { if (number == 0.0) printf("You entered 0."); …
Check Whether a number is positive , negative or zero in C program Read More/*Armstrong or Not*/ #include<stdio.h> main() { int n,r,c,sum=0,temp; printf("Enter number:"); scanf("%d",&n); temp=n; while(n>0) { r=n%10; c=r*r*r; sum=sum+c; n=n/10; } n=temp; if(n==sum) printf("ArmStrong Number"); else printf("Not ArmStrong Number"); } Example: 153 …
Check Whether a Number is Armstrong or Not in C Program Read MoreReversing in C #include <stdio.h> int main() { int n, reversedNumber = 0, remainder; printf("Enter an integer: "); scanf("%d", &n); while(n != 0) { remainder = n%10; reversedNumber = reversedNumber*10 …
Check Whether a Number is Palindrome or Not in C Program Read MoreString Pattern N NE NEP NEPA NEPAL CLS A$=”NEPAL” FOR I = 1 TO LEN (A$) PRINT LEFT$(A$,i) NEXT i END Display NEPAL NEPA NEP NE N CLS A$ = …
String Pattern in QBasic Read MoreMORE PROGRAM RELATED TO NUMERIC PATTERN USING SUB PROCEDURE (CLICK HERE) Series WAP to display the series 2 3 5 8 12 17………. upto 10th terms CLS i = 2 …
Numeric Pattern in QBasic Read MoreWorld is filled with lots of data: images, music, texts, videos generated not only by people but also by computers and other devices. This will only continue to grow and …
Machine Learning a Probabilistic Perspective Read MoreFunctions of Operating System Input / Output (I/O) Management: OS manages the input and output of computer. It applies to the flow of the data among the computers. It is …
Functions of Operating System Read More