Saturday, June 28, 2014

2014 (12) April (12) Assignment Database ERD Reflection Into Database - Database Into Reflectio


Algorithm Program {Prima factor integers N, show TRUE if Prima FALSE if not. Declaration: n: int Prima: boolean i: int fa: int Description: for i <- 2 to n do if n mod i = 0 then fa <- fa +1 endif endfor if fa = 2 then Prima <- TRUE else Prima <- FALSE write (Prima) Program # include # include <iostream> <cstdlib> using namespace std; Prima bool (int n) {int i, fa; bool prime; fa = 1; for (i = 2; i <= n; i + +) {if (n% i == 0) {fa = fa + 1; }} If (fa == 2) {prime = true; Else {prime} = false; Return} prime; } Int main (int argc, char * argv []) {int x; cout << "Enter a number:"; cin >> x; if (Prima (x) == 0) {cout << "Numbers" << x << "is not prime" << endl; } Else {cout << "Numbers" << concur x << "is a prime number" << endl; } System ("pause"); return 0; }
2014 (12) April (12) Assignment Database ERD Reflection Into Database - Database Into Reflection 6 - 5 String Matching Program Program Program Brute Force Prime Numbers Karma Numbers concur Exchange Program Minimum Maximum Reflections Program Database 4th Reflection Base Data 3rd Individual Assignment Reflections Database 1 to Database 2 2013 (19) June (2) May (1) April (9) March (7)


No comments:

Post a Comment