- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
// Sum of Squares and Cubes.cpp : Defines the entry point for the console application. // [code=cplusplus] #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int n,j; cout<<"Enter a Number:"; cin>>n; for(j=1;j<=n;j=j+1) cout<<j*j<< " "; cout<< endl; int a,b,c,sum; a=n+1; b=2*n+1; c=n*a*b; sum=c/6; cout<<"the sum … |
|
// days in a given month.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char month,january,feburary,march,april,may,june,july,august,september,october,novemb er,december; cout<< "\nEnter january,feburary,march,april,may,june,july,august,september,october,november,dec ember : "; cin>>month; switch(month) { case january: cout<< "31\n"; break; case feburary: cout<< "28\n"; … |
|
5. Write a program that adds up the squares and adds up the cubes of integers from 1 to N, where N is entered by the user: Upper Limit: 5 The sum of Squares is 55 The sum of Cubes is 225 Do this by using just one loop that … |
|
I want to do coding on C++ using arrays for the numbers 20,-10,50,4,10,2,6 in ascending order..... |