Q: Find the sum of 1 plus 2 plus 3 plus . plus n nos using c program?

Write your answer...

Submit

Still have questions?

Continue Learning about Engineering

Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.

Use a linked-list.

// HI THIS IS MAYANK PATEL /*C Program to find Maximum of 3 nos. using Nested if*/ #include<stdio.h> #include<conio.h> void main() { int a,b,c; // clrscr(); printf("Enter three number\n\n"); scanf("d%d",&a,&b,&c); if(a>b) { if(a>c) { printf("\n a is maximum"); } else { printf("\n c is maximum"); } } else { if(b>c) { printf("\n b is maximum"); } else { printf("\n c is maximum"); } } getch(); }

1. Read in 'n'2. Output n*(n+1)/2> Check the no. in odd or even?Both possible, has no significance.

/* Bubble sort: code snippet only nos to be sorted are in the array named 'n' of size 'N' for(int i=0;i<N-1;i++) for(int j=i+1;j<N-1-i;j++) if(n[j]>n[j+1]) swap(n[j],n[j+1]); */ /* insertion sort int v,j; for(int i=1;i<N;i++) { v=n[j]; for(int j=i-1;j>0&&n[j]>v;j--) n[j+1]=n[j]; n[j+1]=v; } */

Related questions

if (*&a > *&b) *&max = *&a; else *&max = *&b;

10

void swap (int &pa, int &pb) { *pa ^= *pb; *pb ^= *pa; *pa ^= *pb; }

Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.

How do you lose weight using super nos pump

If both Windows and Unix are using TCP/IP as their primary NOS there isn't much difference to speak of.

int sum (int n) { if (n<=1) return n; else return n + sum (n-1); }

It depends on the series.

There are quite a few places to obtain nos. You can try dougstubes,kcanostubes or thegearpage, These are all great sources to find nos tubes at a great price. Hope this helps you out.

To see what we find.

Write a c program to print the 100 to 1 nos

Miguel nos/se lo sirvio. ('Nos' - us. 'Se' - them)